Japanese Prime Minister Shinzo Abe asked Iranian leaders during his Tehran visit to release American nationals detained by the country, at the request of U.S. President Donald Trump, a Japanese government source said Friday.

At least four Americans, including a Navy veteran who has been sentenced to 10 years in prison, are being detained in the Middle Eastern nation.

The Japanese premier is believed to have requested their release during his talks with Iranian President Hassan Rouhani on Wednesday and Supreme Leader Ayatollah Ali Khamenei on Thursday, the source said. It is not known how they responded.

On Friday morning, Foreign Minister Taro Kono, who had accompanied Abe to Iran, held talks with U.S. Secretary of State Mike Pompeo over the phone.

Kono and Pompeo confirmed that they will continue to work together closely in dealing with the Middle East situation, including the attacks Thursday on two oil tankers, the Foreign Ministry said.

The two ships, one operated by a Japanese company, were targeted near the strategically important Strait of Hormuz, with Washington blaming Tehran, citing its assessment based on intelligence and other factors.

Abe, the first Japanese leader to visit Iran in 41 years, had hoped to serve as a mediator between Tehran and Washington, with tensions having flared in recent weeks and concern growing about possible inadvertent military clashes in the region.

But Iran said Thursday it will not negotiate with the United States, rejecting Abe's bid to broker dialogue between the two countries amid escalating tensions in the Middle East.

The prime minister admitted that the path to easing tensions in the region will be difficult in light of the standoff between Iran and the United States, but said Japan will continue to work toward achieving peace and stability.

Related coverage:

Iran spurns Japan's efforts for mediation with U.S.