Sean Spicer, the White House press secretary, denied reports that the purpose of the attack was to capture or kill any specific Qaeda leader. “The raid that was conducted in Yemen was an intelligence-gathering raid,” he said. “That’s what it was. It was highly successful. It achieved the purpose it was going to get, save the loss of life that we suffered and the injuries that occurred.”

Neither the White House nor the Yemenis have publicly announced the suspension. Pentagon spokesmen declined to comment, but other military and civilian officials confirmed that Yemen’s reaction had been strong.

It was unclear if Yemen’s decision to halt the ground attacks was also influenced by Mr. Trump’s inclusion of the country on his list of nations from which he wants to temporarily suspend all immigration, an executive order that is now being challenged in the federal courts.

According to American civilian and military officials, the Yemeni ban on operations does not extend to military drone attacks, and does not affect the handful of American military advisers who are providing intelligence support to the Yemenis and forces from the United Arab Emirates.

In 2014, Yemen’s government temporarily halted those drones from flying because of botched operations that also killed civilians. But later they quietly resumed, and in recent years they have been increasing in frequency, a sign of the fact that Al Qaeda in the Arabian Peninsula, or AQAP, is considered one of the world’s most dangerous terrorist groups.

The raid stirred immediate outrage among Yemeni government officials, some of whom accused the Trump administration of not fully consulting with them before the mission. Within 24 hours of the assault on a cluster of houses in a tiny village in mountainous central Yemen, the country’s foreign minister, Abdul Malik Al Mekhlafi, condemned the raid in a post on his official Twitter account as “extrajudicial killings.”