This was partly due to Japan having friendly ties with both Washington and Tehran, with this year marking the 90th anniversary of the establishment of diplomatic ties between Japan and Iran.
Abe's visit to Iran, in fact, marked the first visit to be made by a Japanese Prime Minister since Takeo Fukuda in 1978.
Nevertheless, his efforts to broker dialogue between Washington and Tehran were rejected by the latter, Xinhua news agency reported citing informed sources, with Abe stating that the standoff in the region remains difficult.
The Japanese leader said, however, after his talks in Iran, that Tokyo remained committed to working towards the achievement of peace and stability in the region and the de-escalation of tensions between the US and Iran, the Foreign Ministry here said.
During his trip, Abe also asked Iranian President Hassan Rouhani and Supreme Leader Ayatollah Ali Khamenei to release US citizens being held in the country, Kyodo News Agency quoted a Japanese government source as saying.
The request made by Abe, was reportedly on behalf of US President Donald Trump, who was seeking to have at least four American nationals currently detained in Iran repatriated to Washington.
One of the Americans detained in Iran is a Navy veteran, who has been sentenced to 10 year's imprisonment.
The Japanese government source here, according to media reports, said it is not yet known how Rouhani and Khamenei responded to Abe's request.
Japan's Foreign Minister Taro Kono, who also visited Iran with Abe, meanwhile, spoke to US Secretary of State Mike Pompeo over the phone on Friday, with the pair agreeing they would closely cooperate on the situation in the Middle East.
This included the attack the previous day on two oil tankers near the Strait of Hormuz, one of which belonged to a Tokyo-based company, the Foreign Ministry here said.
Following Trump pulling the US out of the nuclear accord and restoring sanctions on Iran, Tehran said it planned to keep more enriched uranium, prompting Washington to send a carrier strike force, B-52 bombers and armed troops to the Gulf, as tensions mounted.
While Abe had geopolitical concerns in mind during his trip to Iran, resource-poor Japan is the world's fourth-largest oil importer and relies on the Middle East for the majority of its crude oil.
Hence, Japan also has a vested interest in the strategically important Strait of Hormuz remaining open for the passage of tankers without the threat of attack for economic reasons as well.