US Secretary of State Mike Pompeo travelled to Baghdad on an unannounced visit tied to rising tensions with Iran and security threats involving the US presence in Iraq.

An Iraqi government source confirmed on Tuesday that Mr Pompeo had arrived on his second trip there this year and met Prime Minister Adel Abdul Mahdi, Agence France-Presse reported.

"We talked to them about the importance of Iraq ensuring that it’s able to adequately protect Americans in their country," Mr Pompeo said after their meeting.

Secretary of State Mike Pompeo arrives in Baghdad. AP

The US also wanted to let Iraqi officials know more about "the increased threat stream that we had seen" so they could effectively safeguard US forces.

Expressing American support for Iraqi sovereignty, Mr Pompeo said: "We don’t want anyone interfering in their country, certainly not by attacking another nation inside of Iraq."

He cancelled a trip to Germany to make the Iraq visit, which will reaffirm the US presence in the face of Iranian threats.

Washington's announcement that it is sending an aircraft carrier and bombers to the region is in response to possible Iranian plots against US interests.

“The threats from Iran included 'specific and credible' intelligence that Iranian forces and proxies were targeting US forces in Syria, Iraq and at sea," a US official told CNN on Monday.

The US has an estimated 5,000 troops in Iraq.

US Central Command spokesman Capt Bill Urban said there had been "indications that Iranian and Iranian proxy forces were making preparations to possibly attack US forces in the region".

Iraq's President Barham Salih, right, meets Mike Pompeo in Baghdad. Reuters

The Pentagon believes Iran could be a threat to US and allied forces in Saudi Arabia, Bahrain and Qatar, CNN reported.

Mr Pompeo had been due to head to Germany to meet Chancellor Angela Merkel and Heiko Maas, the German foreign minister.

No specific reason was given for the cancellation.

"Unfortunately, we must reschedule the Berlin meetings due to pressing issues," State Department spokeswoman Morgan Ortagus told those travelling with Mr Pompeo.

"We look forward to rescheduling this important set of meetings. The secretary looks forward to being in Berlin soon."

Mr Pompeo was due to visit the UK on Wednesday but that trip will likely be cancelled also.