Japan will extend up to 32.7 billion yen ($300 million) in low-interest loans to Iraq to assist the country's plan to upgrade one of its oil refineries, Foreign Minister Toshimitsu Motegi told his Iraqi counterpart Fuad Hussein on Saturday.

Motegi made the pledge during an unannounced trip to Baghdad, the first visit to Iraq by a Japanese foreign minister after Taro Aso in August 2006.

Separately, the Japanese Foreign Ministry said a meeting has been set for Sunday between Motegi and new Iranian President Ebrahim Raisi, an anti-U.S. conservative hard-liner who took office this month, in Tehran.

Supplied photo shows Japanese Foreign Minister Toshimitsu Motegi (L) and Iraq Foreign Minister Fuad Hussein in Baghdad on Aug. 21, 2020. (Photo courtesy of Japan's Foreign Ministry)(Kyodo)

The meeting comes as Iran faces a deadlock in nuclear talks with the United States and Europe. Japan has built a friendly relationship with Tehran while also being allied with Washington.

Besides Hussein, Motegi held separate talks in Baghdad with Iraqi President Barham Salih and Prime Minister Mustafa al-Kadhimi, and the two sides agreed to step up cooperation in ensuring peace and stability in the Middle East country.

The Japanese Foreign Ministry did not announce Motegi's visit to Iraq -- which came between his trip to Turkey and planned travel to Iran as part of his Middle East tour -- due to safety reasons.

The originally released itinerary said he would fly from Istanbul straight to Tehran on Saturday morning.

The financial aid will be used to expand one of Iraq's major refineries in Basra, southern Iraq, as part of efforts to rebuild the economy, according to the ministry.

Motegi and Hussein also discussed regional issues including the crisis in Afghanistan, as well as ways to expand business between Japan and Iraq, the ministry said.

Prior to the trip to Iraq, the Japanese minister visited Egypt, the West Bank to meet with Palestinian leaders, Israel, Jordan and Turkey.

During the visit to Iran, he will also meet with Foreign Minister Mohammad Javad Zarif and Hossein Amir Abdollahian, a former deputy foreign minister who is set to succeed Zarif under the Raisi administration.

Raisi has called for the lifting of U.S. sanctions on Iran, which have been strengthened since 2018 when then President Donald Trump's administration pulled out of the 2015 nuclear deal with Tehran.

After Iran, Motegi will travel to Qatar before returning home on Tuesday.

Related coverage:

FEATURE: Japan plant builder inks deal to construct key Iraqi oil refinery

Japan foreign minister to visit Middle East from Aug. 15

Japan foreign minister planning talks with new Iran president on Aug. 22