President Barack Obama declared an end to the seven-year U.S. combat mission in Iraq on Tuesday and promised recession-weary Americans my central responsibility now is to repair the U.S. economy.

Obama, who inherited the war from President George W. Bush and is fighting another in Afghanistan, said he had fulfilled a 2008 campaign promise to end U.S. combat operations in Iraq and declared the Iraqi people now have lead responsibility for their security.

Now, it is time to turn the page, Obama said in an Oval Office address, speaking from the same desk Bush had used to declare the 2003 start of the war.

Iraqi Prime Minister Nuri al-Maliki told Iraqis their country today is sovereign and independent. But many Iraqis, who have seen at least 100,000 of their countrymen killed since the 2003 invasion, are apprehensive as U.S. military might is scaled down, with violence continuing and efforts to form a new government stalemated six months after an inconclusive vote.

The United States has spent almost a trillion dollars and more than 4,400 U.S. soldiers have been killed since the war began. A recent CBS News poll found 72 percent of Americans now believe the war was not worth the loss of American lives.

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

Obama called on Iraqi leaders to move ahead with a sense of urgency to form an inclusive government.

Our combat mission is ending, but our commitment to Iraq's future is not, he said.

The president, who opposed the war and the troop surge launched by Bush in 2007, said he spoke to Bush earlier in the day by phone. He stopped short of praising Bush, as Republicans have demanded, for the surge that helped turn the tide in the war.

It's well known that he and I disagreed about the war from its outset. Yet no one could doubt President Bush's support for our troops, or his love of country and commitment to our security, Obama said.

Republican Senator John McCain told Reuters afterward that Obama should have thanked Bush.

I appreciate him mentioning George Bush's name, but he gave him no credit for the surge. If it hadn't been for the surge, we never would've succeeded. It's too bad he couldn't admit that he was wrong, because if he had his way, we would've lost in Iraq, said McCain, who lost to Obama in the 2008 presidential election.

Iraqi Foreign Minister Hoshiyar Zebari warned Iraq's neighbours against interfering as the remaining 50,000 U.S. troops in Iraq are withdrawn 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 ECONOMY AND ELECTIONS

Obama sought to tie the end of the combat mission in Iraq with his efforts to bring down a stubbornly high 9.5 percent jobless rate that is endangering Democratic Party rule in Washington in the November 2 congressional elections.

Americans are looking to Obama for leadership on boosting the U.S. economy and some analysts were questioning his foreign policy focus this week -- Iraq and the Middle East peace talks -- at a time of fears of a double-dip recession.

In the same sober tone he used to discuss the war, Obama sought to allay those fears.

Today, our most urgent task is to restore our economy, and put the millions of Americans who have lost their jobs back to work, Obama said. This will be difficult. But in the days to come, it must be our central mission as a people, and my central responsibility as president.

In an apparent jab at Bush, Obama said that over the past 10 years the United States had not done what is necessary to shore up its economy.

We have spent over a trillion dollars at war, often financed by borrowing from overseas. This, in turn, has short-changed investments in our own people, and contributed to record deficits, he said.

Obama visited the U.S. Army base at Fort Bliss, Texas, earlier on Tuesday to celebrate the Iraq milestone but stressed his Oval Office speech should not be seen as a victory lap.

The White House wanted to avoid any comparisons between Obama's speech and the May 2003 speech by Bush when he declared major combat operations over in Iraq in front of a Mission Accomplished banner, only to see violence skyrocket in the months and years afterward.

Bush launched the war over suspicions that Iraq possessed weapons of mass destruction. No such weapons were found.

Obama, who shifted the U.S. focus to Afghanistan when he took office in early 2009, pledged to stick to a plan to begin a U.S. troop withdrawal next summer.

He said the thousands of extra troops he has deployed to Afghanistan will be in place for a limited time to help Afghans prepare to provide for their own security.

The pace of our troop reductions will be determined by conditions on the ground, and our support for Afghanistan will endure. But make no mistake: this transition will begin -- because open-ended war serves neither our interests nor the Afghan people's, he said.

McCain said he worried that Obama's specific withdrawal timetable will doom us to failure in Afghanistan.

LACK OF RECONCILIATION

With tensions festering over Iraq's inconclusive election, U.S. Vice President Joe Biden was in Baghdad 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.

But there were plenty of fears about Iraq from the U.S. side. A senior U.S. intelligence official, speaking on condition of anonymity, told reporters he was more worried about the lack of political reconciliation than the threat from Iran or al Qaeda in Iraq.

The roughly 50,000 U.S. soldiers still in Iraq are moving into an advisory role in which they will train and support Iraq's army and police. Obama has promised to pull all U.S. troops out of Iraq by the end of 2011.

The effective change on the ground will not be huge because the U.S. military has already been switching the focus towards training and support over the past year.

Iraqi 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.

(Additional reporting by Ross Colvin, Patricia Zengerle, Alister Bull and Caren Bohan; Editing by David Alexander and Eric Beech)