Mike Pompeo makes last-minute trip to Iraq, amid heightened tensions with Iran

The secretary's last-minute trip came at the expense of a visit to Germany.

The surprise visit came just two days after the U.S. announced plans to move an aircraft carrier strike group to the Middle East ahead of schedule and warnings from Iran that it would halt implementation of some parts of the nuclear deal. Wednesday marks one year since President Donald Trump withdrew from the agreement and began an economic pressure campaign to squeeze the Iranian government.

Late Sunday night, the White House announced that the USS Abraham Lincoln and a bomber task force were being deployed in response to unspecified "troubling and escalatory indications and warnings" of a threat from Iran, although the Pentagon later confirmed the aircraft carrier was already scheduled to stop in the region. U.S. officials told ABC News there were "clear indications" Iranian and Iranian proxy forces were preparing for a possible attack against U.S. forces on land, including in Iraq and Syria, and at sea.

"This would be an effort to take American forces out that continue our campaign against ISIS," Pompeo said Tuesday of the threat, after departing Baghdad. "These were attacks that were imminent. These were attacks that were going to happen fairly soon. We've learned about them, and we're taking every action to deter them."

The trip came at the expense of a planned visit to Germany, where Pompeo was scheduled to meet Chancellor Angela Merkel and Foreign Minister Heiko Maas. The Trump administration's relationship with Merkel's government has been rocky, with Trump and Merkel lacking a warm personal relationship, according to U.S. and German officials. The alliance has also been strained by disagreements over the Iran nuclear deal, trade, a pipeline between Russia and Germany, defense spending and more.

Both sides, however, said Germany understood the importance of Pompeo's visit to Iraq and that they would reschedule.

"Unfortunately, we must reschedule the Berlin meetings due to pressing issues," State Department spokesperson Morgan Ortagus said in a statement before the Baghdad visit. "We look forward to rescheduling this important set of meetings. The Secretary looks forward to being in Berlin soon."

Pompeo spoke by phone with Maas instead, with a German Foreign Office spokesperson saying, "Both sides agreed they would find a new date soon. Foreign Minister Maas expressed his understanding for the rescheduling."

Beyond beefing up security of Americans in Iraq, Pompeo said his visit was also critical "to assure [Iraq] that we stood ready to continue to ensure that Iraq is a sovereign, independent nation," especially by pushing for Iraqi energy independence.