BAGHDAD - Iraqi Prime Minister Mustafa al-Kadhimi travelled to Tehran on Tuesday where Iranian state media reported he would meet Supreme Leader Ayatollah Ali Khamenei on his first foreign trip since taking office in May.

Kadhimi's visit was meant to come after a trip to Saudi Arabia but that was cancelled after Saudi's King Salman bin Abdulaziz was admitted to hospital suffering from inflammation of the gall bladder. 

The Iraqi premier faces a tough balancing act between Iran and the United States who have come close to open conflict in the region, including on Iraqi soil over the past year.

At home, Kadhimi is coming under increasing pressure from Iran-aligned parties and paramilitary groups who perceive him as siding with the United States because he has indicated he wants to curb the power of Iran-backed militias and political groups.

In his first two months in office security forces carried out two arrest raids against militias but most of those detained were quickly released. 

The United States praised those moves and supporters welcome several appointments he has made in the security forces, including reinstating Iraq's Counter Terrorism Service chief Abdul Wahhab al-Saidi, whose dismissal under the previous government fuelled mass anti-government unrest last year.

Iran's Foreign Minister Mohammad Javad Zarif visited Baghdad on Sunday, making a stop at the site where a U.S. drone strike killed Iranian military mastermind Qassem Soleimani and Iraq's paramilitary chief Abu Mahdi al-Muhandis in January.

That action brought the region to the brink of a full U.S.-Iran conflict.

(Reporting by Amina Ismail in Cairo, John Davison in Baghdad, editing by Alexandra Hudson) ((amina.ismail@thomsonreuters.com; +20 2 2394 8114;))