(CNN) -- Iraq's prime minister will visit the White House next month, just a couple of weeks before American troops are scheduled to depart from the country.
President Barack Obama will welcome Prime Minister Nuri al-Maliki on December 12, the White House said Friday.
"The two leaders will hold talks on deepening the comprehensive strategic partnership between the United States and Iraq. The president honors the sacrifices and achievements of all those who have served in Iraq, and of the Iraqi people, to reach this moment full of promise for an enduring U.S.-Iraq friendship," the White House said in a statement.
The United States has until December 31 to withdraw its troops under the Status of Forces Agreement signed between the two countries in 2008. U.S. officials have been in discussions to maintain several thousand trainers and advisers in Iraq, but the two countries were not able to overcome an impasse about granting American troops immunity beyond the withdrawal deadline, prompting Obama to announce last month that no troops would be staying after 2011.
A U.S. military official familiar with the drawdown plan said a "small number" of troops will remain attached to the U.S. Embassy in a security role, but in the new year the thousands of contractors and diplomats who remain in Iraq will depend on 5,000 private contractors for security.
The Pentagon said Thursday that the withdrawal is on schedule and that U.S. troop levels are now below 34,000 with just two months until the deadline.
Maj. Gen. Thomas Spoehr predicted that most of the U.S. military will be out well before the New Year's Eve deadline, as CNN first reported in October.
"I think it is clear to me that by the time we get to about mid-December or so, the vast majority of the U.S. forces in Iraq we plan to have them withdrawn," Spoehr said.
Despite major security improvements, dangers remain.
"This is not a rush to the exits," Spoehr said. "So it is a measured plan that ensures our continued force protection at every step of the operation."