President Barack Obama on Tuesday praised Iraqi leaders for agreeing to form a new government after months of political turmoil, saying the move represents a "major step forward in advancing national unity."

Obama, in a statement, said the new government "is a clear rejection of the efforts by extremists to spur sectarian division." He also said, "Yet again, the Iraqi people and their elected representatives have demonstrated their commitment to working through a democratic process to resolve their differences and shape Iraq's future."

Iraq's parliament approved a second term for Prime Minister Nouri al-Maliki and his partial cabinet line-up. The parliament also approved posts for Maliki's rivals, including Ayad Allawi.

Iraq was politically gridlocked for nearly a year after parliamentary polls in March were inconclusive. The Obama administration has pointed to the political fighting as a positive sign, saying it shows the country has started to move beyond sectarian violence toward democracy.

Obama marked the end of combat operations in Iraq in August, though thousands of U.S. troops are still in the country and will be until at least the end of 2011.

Obama vowed to continue "to strengthen our long-term partnership with Iraq's people and leaders as they build a prosperous and peaceful nation that is fully integrated into the region and international community.