LAKHDAR BRAHIMI worked no miracles in the appointment of Iraq's new government. The veteran United Nations envoy had been cast by the Bush administration as a one-man nation-builder who would somehow produce an administration that was broadly representative and capable of taking over sovereignty from the U.S.-led occupation. In the end, hemmed in by hovering U.S. officials and their present and former Iraqi allies, Mr. Brahimi acquiesced to a cabinet led by the same former exiles and Kurdish politicians who populated the discredited Iraqi Governing Council. Perhaps he had few alternatives: Iraq appears nearly bereft of political leaders who are popular, capable and willing to cooperate with the U.S. plans for political transition. Maybe, too, Mr. Brahimi's endorsement, and that of the United Nations, will help the new administration establish itself. But Iraq's interim leaders will have to act quickly and skillfully if they are to gain enough authority to carry out their primary mission, which is to prepare for national elections six months from now.

The new prime minister, Ayad Allawi, and the largely ceremonial president, Ghazi Yawar, appear at least to understand the importance of establishing their independence from the Bush administration. Both managed to win appointment by gathering support from the various factions on the Governing Council, and thereby trump other candidates favored by Mr. Brahimi or senior U.S. officials. Both have been moderately critical of the U.S. performance in Iraq, and while acknowledging the need for continued support from U.S. and coalition troops, have vowed to push for full sovereignty in negotiations with Washington and the U.N. Security Council. Their show of independence may or may not win them much support from Iraqis, who, according to polls, largely regard the Governing Council members as U.S. puppets. The council dissolved itself yesterday, but its members or their close allies took over many of the key positions in the interim government.

A national assembly planned by Mr. Brahimi for next month, which could be attended by 1,000 delegates and lead to the selection of a 100-member national council, might bolster the interim government if it is more genuinely representative. The Bush administration could help, too, by visibly deferring to the new administration in all areas, including security. President Bush promised yesterday to be "flexible" in negotiating military arrangements in Iraq after June 30; keeping that promise will be important both to establishing the new government and to winning the broader international support it will need. U.S. troops must continue to fight foreign terrorist groups and Iraqi extremists who seek to disrupt the planned elections, and they also have to defend themselves. But Iraqi leaders should play a much larger role in deciding how to establish and maintain security in areas where an anti-American insurgency has flourished.

Even in the best of cases, the June 30 transfer of sovereignty may not substantially improve the difficult conditions in Iraq. Mr. Bush reiterated yesterday that violence may grow still worse in the coming months. Just as Mr. Brahimi had no magic solution to the problem of Iraqi leadership, there will be no easy way to end the various insurgent movements in the country -- they can neither be crushed by military force alone nor entirely tamed by political deals. The new Iraqi government and the Bush administration will instead have to pragmatically navigate a bumpy course toward the one goal that is shared with Iraqi's majority: elections for a truly representative government. If that democratic vote, rather than Washington's policy agenda or Iraqis' personal ambitions, remains the dominating priority, then the new administration in Baghdad will have a reasonable chance of surviving the difficult months ahead.