Secretary of State Mike Pompeo made a surprise visit to Baghdad Tuesday to show support for the Iraqi government as the Trump administration intensified its pressure campaign against Iran.

The lightning-quick trip began and ended after nightfall and under heavy security following the abrupt cancellation of a scheduled visit to Germany by Pompeo. Journalists accompanying Pompeo were not told of his new destination until his plane left for Baghdad and were not allowed to report on his whereabouts until after his plane had taken off for London.

During the flight to Baghdad, Pompeo told reporters he would meet with Iraqi President Barham Salih and Prime Minister Adel Abdul-Mahdi.

“You’ve all seen the reports that there have been escalating — information that indicates Iran is escalating their activity," Pompeo said. "I wanted to go to Baghdad to speak with the leadership there, to assure them that we stood ready to continue to ensure that Iraq is a sovereign, independent nation.”

Pompeo also said he wanted to underscore Iraq's need to protect Americans in their country.

"We 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," he said. "They understood, too, it's important for their country."

The secretary of state added that he would also discuss unfinished business deals that he said would allow Iraq to wean itself from dependence on Iranian energy.

“These aren’t even all American business deals. These are — this is about trying to assist Iraq in obtaining their energy independence. Some of these are potential power line opportunities out of Jordan and out of Egypt, so electricity then can be provided. So this isn’t about American commerce. This is about ensuring that there’s Iraqi energy independence,” he said.

Late Sunday, the U.S. announced that it is rushing an aircraft carrier group to the Middle East to deter or respond to any Iranian attack. U.S. officials have said there are indications Iran is planning to retaliate for the Trump administration’s stepped-up sanctions on the country, although the threat information remains vague.

As tensions rise between Washington and Tehran, Baghdad in some ways is caught in the middle. Iraq has a close relationship with the U.S., which is leading the international coalition in the war against ISIS group in Iraq and Syria. More than 5,000 U.S. troops are stationed on Iraqi soil.

But Iraq is also tightly enmeshed with Iran in trade, security and political matters, and it has been loath to antagonize its larger neighbor. Iran won the ear of many top Iraqi politicians after it stepped in to fill the political vacuum following the 2003 U.S. invasion. It also can count on the loyalty of several powerful Iraqi militias, which have fought previously against U.S. forces in the country and on the side of Iran’s allies in Syria in that country’s civil war.

CLICK HERE TO GET THE FOX NEWS APP

The Trump administration has made several recent moves to squeeze Iran. Last month, President Donald Trump announced the U.S. would no longer exempt any countries from U.S. sanctions if they continue to buy Iranian oil. The U.S. also designated Iran’s Revolutionary Guard as a terrorist group, the first ever for an entire division of another government.

Trump withdrew from the Obama administration’s landmark nuclear deal with Iran in May 2018 and, in the months that followed, re-imposed punishing sanctions, including those targeting Iran’s oil, shipping and banking sectors.

Fox News’ Rich Edson and Nick Kalman and The Associated Press contributed to this report.