WASHINGTON  When the vice president, the secretary of state and the national security adviser all say you have been tapped to be the next United States ambassador to Iraq, odds are it’s a done deal, right?

Apparently not in the Obama administration.

Gen. Anthony C. Zinni, the former top American commander in the Middle East, said the Obama administration offered him the Baghdad job late last month, but withdrew the appointment without explanation, apparently in favor of a veteran diplomat, Christopher R. Hill.

With General Zinni fuming in undiplomatic fashion about the way he was treated, the question of who should be the next ambassador to Iraq has turned into an embarrassing mess for the Obama administration as it struggles to recover from other stumbles over high-profile nominations. There has still been no formal announcement about the Iraq job.

“By any measure, Zinni is one of the most talented military officers of his generation,” said Michael E. O’Hanlon, a specialist on Iraq at the Brookings Institution. “The bigger issue for the country and the Obama administration is to make sure they explain themselves. Otherwise, people will assume the worst motives.”