(CNN) Secretary of State Mike Pompeo made an unannounced trip to Iraq on Tuesday after abruptly canceling a planned trip to Berlin amid escalating tensions with Iran.

The top US diplomat met with Prime Minister Adil Abd al-Mahdi, President Barham Salih and other officials while on the ground in the Iraqi capital in a roughly four-hour visit, according to the pool traveling with Pompeo.

Pompeo described his meetings as "productive" and said he spoke to the officials "about the importance of Iraq ensuring that it's able to adequately protect Americans in their country."

"They both provided assurances that they understood that was their responsibility," he said.

He also said that the US "wanted to let them know about the increased threat stream that we had seen and give them a little bit more background on that so they could ensure that they were doing all they could to provide protection for our team."

Read More