Mr. Pompeo’s visit, shrouded in secrecy until after it was over, came on the eve of the one-year anniversary of Mr. Trump’s repudiation of the 2015 nuclear agreement with Iran and the reimposition of American sanctions, which have been increasingly squeezing Iran’s economy. Iran said Monday it would no longer comply with parts of the agreement, alarming European officials who have hoped to preserve the accord, meant to ensure Iran’s peaceful use of nuclear energy.

The choreography of Mr. Pompeo’s Iraq stopover also appeared designed to send a message to Iran. Before he flew to Baghdad, the State Department said Mr. Pompeo, who had been in Finland, had abandoned a scheduled meeting in Berlin with Chancellor Angela Merkel of Germany because of unidentified “pressing issues.”

The Trump administration has not provided specific details about what it has called the new threat from Iran, which has drawn some skepticism, given the history of faulty intelligence that led to the Iraq war. But officials have told The New York Times that new intelligence has raised concerns about Iran’s Islamic Revolutionary Guards Corps and its connections to some of Iraq’s Shiite Arab militias.

Asked by reporters to elaborate, Mr. Pompeo said, “I just don’t want to go into the details of that anymore.” But he also reiterated his contention that the Revolutionary Guards is a terrorist organization. “This was just calling out the truth,” he said.

It was Mr. Pompeo who last month placed the Revolutionary Guards on the State Department’s list of foreign terrorist organizations, against the advice of American intelligence and Pentagon officials, who warned that Iran’s clerical government could reciprocate and put United States personnel at risk in the Middle East.

Last week, President Hassan Rouhani of Iran declared all American forces in the Middle East terrorists and labeled the United States government a state sponsor of terrorism.

To counter what the Trump administration has described as the new threat, the Pentagon has expedited an already-scheduled deployment of the U.S.S. Abraham Lincoln aircraft carrier strike group to the Persian Gulf.