Iraq celebrated its sovereignty as the U.S. military formally ended combat operations on Tuesday, despite political deadlock and persistent violence, and warned other countries not to interfere as U.S. troops depart.

U.S. troop levels were cut to 50,000 before the partly symbolic deadline of August 31 set by President Barack Obama as he seeks to fulfil his pledge to end the war launched by his predecessor George W. Bush.

The six remaining U.S. brigades will turn their focus to training Iraqi police and troops as Iraq takes charge of its own destiny ahead of a full U.S. withdrawal by the end of next year.

Iraq today is sovereign and independent, Prime Minister Nuri al-Maliki told Iraqis in a televised address to mark the U.S. forces' shift to assisting rather than leading the fight against a Sunni Islamist insurgency and Shi'ite militia.

With the execution of the troop pullout, our relations with the United States have entered a new stage between two equal, sovereign countries.

Obama promised war-weary U.S. voters he would extricate the United States from the war, launched by Bush with the stated aim of destroying Iraqi weapons of mass destruction.

No such weapons were found. Almost a trillion dollars have been spent and more than 4,400 U.S. soldiers and over 100,000 Iraqi civilians killed since the 2003 invasion.

Obama's Democrats are battling to retain control of Congress in November elections and he faces other challenges -- a worsening war in Afghanistan and storm clouds over the economy.

Tuesday's deadline was to some extent a symbolic one. The 50,000 U.S. soldiers staying on in Iraq for another 16 months are a formidable and heavily-armed force.

Iraqi security forces have been taking the lead since a bilateral security pact came into force in 2009. U.S. soldiers pulled out of Iraqi towns and cities in June last year.

IMPASSE

Nevertheless, Iraqis are apprehensive as U.S. military might is scaled down, especially amid stalemate in efforts to form a new government six months after an inconclusive election and continuing violence.

The impasse has raised tensions as politicians squabble over their share of power and insurgents carry out attacks aimed at undermining faith in the domestic security forces.

Foreign Minister Hoshiyar Zebari warned Iraq's neighbours against interfering as U.S. troops withdraw by an end-2011 deadline set out in a bilateral security pact.

We have warned all of them there wouldn't be any vacuum, and if there would be a vacuum, the only people who will fill that vacuum are the Iraqis themselves, he said.

The White House said on Tuesday Iraq's leaders should move forward with forming a government with a sense of urgency and Vice President Joe Biden flew into Baghdad on Monday not just to mark the end of combat operations but also to press for talks.

Notwithstanding what the national press says about increased violence, the truth is things are very much different. Things are much safer, Biden told Maliki.

Toppled dictator Saddam Hussein's outlawed Baath party crowed that the U.S. pullback was a result of devastating strikes against U.S. troops by Iraqi resistance fighters.

They withdrew dragging tails of failure and defeat, leaving by the same roads they used as invaders, it said in a statement carried by Iraqi websites. The end of the U.S. combat mission in Iraq is a useless attempt to save face, if any is left.

U.S. officials said Washington had a long-term commitment to Iraq, and the military pullback would allow diplomats to take the lead in building economic, cultural and educational ties. For that they need a new Iraqi government to be in place.

Violence has declined sharply since the peak in 2006/07 of the sectarian slaughter unleashed by the U.S.-led invasion, but a recent series of attacks has rung alarm bells.

Many Iraqis had hoped the March 7 election would chart a path towards stability at a time when deals to develop the country's vast oilfields hold the promise of prosperity.

Instead, the ballot could widen ethnic and sectarian rifts if the actual vote leader, ex-premier Iyad Allawi's Sunni-backed cross-sectarian Iraqiya alliance, is excluded from power by the major Shi'ite-led political factions.

Suspected Sunni Islamist insurgents linked to al Qaeda have tried to exploit the political vacuum and declining U.S. troop numbers with a series of suicide bombings and assassinations.

Iraqis also fear that Shi'ite Iran will seek to fill any vacuum left by the U.S. military, in competition with Sunni-led neighbours such as Turkey and Saudi Arabia.

(Additional reporting by Ahmed Rasheed, Muhanad Mohammed, Rania El Gamal and Aseel Kami; writing by Michael Christie; editing by Andrew Roche)