President Barack Obama said Friday that all U.S. troops will be withdrawn from Iraq by the end of the year.

Troops in Iraq will definitely be home for the the holidays, the President said from the press room at the White House. Over the next few months,10,000 troops will pack up their gear and go home... with their heads held high.

Obama and Iraqi Prime Minister Nouri al-Maliki agreed that the U.S. would adhere to an established schedule and withdraw from the country completely. The two leaders had been discussing the possibility of leaving a small American force in the country, but those talks seemed to have dissolved.

That conversation between Iraq and the U.S. had been going on for months, as American officials feared their security efforts could come undone once troops were sent home. The U.S. was determined to leave officers in the country to help train Iraqi security personnel, but Maliki and other Iraqi politicians were ready to see the American force go home.

Iraqis have taken full responsibility for their security, President Obama said Friday.

That doesn't mean that the United States' work in Iraq is finished, he added.

Obama noted that the U.S. and Iraq have entered a new, collaborative stage of their relationship and the U.S. will help Iraq develop in the trade, commerce, culture and education sectors, and to achieve regional security and peace.

There's also still a possibility that the U.S. will provide some security training, just like the United States does elsewhere in the world. Insurgent attacks happen in Iraq nearly everyday, and when withdrawal was discussed two to three years ago, some analysts feared that it could result in a civil war.

While the President didn't pass judgment about the overall success of nine years of war in Iraq, he did note that the U.S. achieved major victories against al-Qaida, including the death of bin Laden.

During the whole Iraq mission, more than one million people served in the country. Now, troops will come home by the thousands until all personnel are home before 2012.

Obama has also ordered a complete withdrawal of troops from Afghanistan by 2014, a third of whom will return home by the end of this year.

Despite the planned withdrawal, some experts feel that the U.S. could be in Afghanistan for 10 or more years to come.

Like in Iraq, the plan now is to continue training local Afghan security forces so that they can protect themselves after the final troop withdrawal in 2014. However, there are concerns on both sides that the time frame is unrealistic.

It is entirely possible that there may still be U.S. forces and other international forces here [Afghanistan] after 2014, Ryan Crocker, the U.S. Ambassador to Afghanistan, told The Times of London.

U.S. and Afghan officials are meeting in secret about a long-term security plan that could keep America in Afghanistan not just for years, but for decades. These negotiations began in May, and the U.S. would like to leave a small force of troops, as well as spies and some air support in the country, with Afghanistan's permission.

The residual U.S. presence would help Afghan security personnel combat insurgents while protecting citizens. The U.S. could also use Afghanistan as a launch point for drone strikes on militants in Pakistan and elsewhere.

The United Kingdom, whose military provides 10,000 of the 30,000 coalition troops in Afghanistan, already said in September that it would stay in Afghanistan after 2014.

We will be there after 2014 to help [the Afghan National Security Forces] in a mentoring role and I imagine [United Arab Emirates] may leave a number of people, said Lord Astor, the Undersecretary of State for Defense, in a meeting with the U.A.E.