Prime Minister Shinzo Abe asked Iranian leaders during his Tehran visit to release Americans 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 Iran.

Abe is believed to have requested the releases 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.

As the first Japanese prime minister to visit Iran in 41 years, Abe was hoping 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 foes amid escalating tensions in the Middle East.

Abe admitted the road to easing tensions in the region amid the standoff between Iran and the United States will be rough but said that Japan will continue to work toward achieving peace and stability.

Khamenei told Abe on Thursday that it was pointless to reply to a message he had brought to Tehran from Trump.

“I do not see Trump as worthy of any message exchange, and I do not have any reply for him, now or in future,” Iranian state media quoted Khamenei as telling the Japanese leader.

Trump said he appreciated the visit by Abe to Iran but that he believed it is “too soon to even think about” the United States making a deal with Tehran.

“They are not ready, and neither are we!” Trump said in a tweet.

U.S. allies in Europe and Asia have repeatedly expressed concern that tension between the United States and Iran could escalate into an armed conflict. After meeting Rouhani on Wednesday, Abe warned of unintended clashes in the Middle East.

Ultimate authority in Iran is wielded by Khamenei, a hard-line cleric in power since 1989, although the country is run day-to-day by Rouhani, the pragmatist president who won two landslide elections on promises to open Iran to the world.

Khamenei said a recent promise by Trump not to seek regime change in Iran was “a lie.”

“The Islamic Republic of Iran has no trust in America and will never repeat the bitter experience of previous negotiations with America in the framework of the JCPOA,” Khamenei said, using the acronym for the nuclear deal. “No wise and proud nation will accept negotiations under pressure.”

Abe told reporters in Tehran that Khamenei had promised Iran had no intention of pursuing nuclear weapons. Iran has always maintained its nuclear program is peaceful.

On a visit to Japan last month, Trump welcomed Abe’s help in dealing with Iran.

Last month Washington revoked sanctions waivers that had allowed some countries, including Japan, to buy Iranian crude. In its latest move, the U.S. Treasury prohibited companies on Friday from doing business with Iran’s largest petrochemical group, citing ties to Iran’s Revolutionary Guard.

“The U.S. president, after a meeting with you and discussions on Iran … imposed sanctions on Iranian petrochemical sector. Is this a message of honesty? Does that show he seeks honest negotiations?” Khamenei told Abe.

“Japan is an important Asian country and if it wants to expand ties with Iran, it should show a firm stance, as other countries have done,” Khamenei said.