The prime ministers of Japan and Israel compared notes Monday about living near countries with suspected illicit nuclear weapons programmes.
Benjamin Netanyahu, on the second day of a five-day trip to Japan, said the international community should keep up pressure on Iran, which the West suspects of trying to develop atomic bombs.
In a joint statement released with his Japanese counterpart Shinzo Abe, the two men also "expressed their strong hope for the early resolution of various issues of concerns regarding North Korea, including its nuclear development".
Speaking at a joint news conference after their meeting, Netanyahu said Abe had told him in no uncertain terms that Japan was facing a very real threat from the North, which observers say is preparing for a fourth nuclear test.
"The same words -- 'clear and present danger' -- certainly apply to the Iranian nuclear programme as well," he said.
"Like North Korea before it, Iran wants to keep its military capabilities, military nuclear capabilities while easing the sanctions that are applied to it.
"We cannot let the ayatollahs win," Netanyahu said.
Tehran insists its nuclear programme is intended only to generate power for civilian purposes.
Iran and the five permanent members of the UN Security Council plus Germany will begin talks in Vienna on Tuesday when they start drafting the text of a comprehensive and potentially historic deal.
An accord would de-fang Iran's atomic programme with a drastic reduction in scale. In return, all UN Security Council sanctions and additional unilateral sanctions targeting Iran's lifeblood oil exports would be lifted.
Japan, which depends heavily on Middle Eastern oil, has maintained friendly relations with Iran through its years of ostracism by the West.
Signup to our newsletter and follow us on Facebook and Twitter!
- Cyber security -
Netanyahu and Abe also "confirmed the necessity of cooperation in the field of cyber-security and... affirmed the importance of bilateral defence cooperation", according to the statement.
"They concurred with the visit of officers of the Japan Self-Defense Forces to Israel."
Abe is pushing for Japan's well-equipped and well-trained military to take a more active role in world affairs, a strategy he has dubbed a "proactive contribution to peace".
Under the current constitution the Japanese military can only fire if fired upon, but Abe would like to expand the scope of their activities to include so-called "collective self-defence".
The issue is controversial in Japan where the post-World War II commitment to pacifism runs deep.
Agreements to carry out officer visits to friendly nations are the kind of baby-steps the Abe administration hopes will eventually lead to greater acceptance of the nation's military, nearly seven decades after its total defeat.
In a brief reference to the moribund Middle East peace process, the joint statement said: "Both sides emphasised the necessity for achieving peace through a 'two-state solution' toward stability and prosperity of the Middle Eastern region."
"Prime Minister Abe called upon all concerned parties to further endeavour to advance the direct negotiations and expressed his intention to make best efforts for achieving peace."
Negotiations collapsed last month after two opposing Palestinian factions buried the hatchet, ending years of bitter rivalry but angering Israel which refuses to talk to the hardline Hamas.
Netanyahu, who is in Japan until Thursday, is expected to meet Japanese business leaders on Tuesday. His trip is expected to be heavily weighted towards hi-tech trade between the two countries.