Baghdad (CNN) -- After nearly a year fraught with political infighting, Iraq finally has a new government.
The Iraqi parliament Tuesday voted in Prime Minister Nuri al-Maliki's government, even though some vacancies remain.
The long-awaited legislative action comes more than nine months after a hotly disputed national election that threatened to inflame the country's deep sectarian tensions.
Within moments of the announcement, celebratory gunfire broke out across the capital.
This is a "day of pride" for the Iraqi people, al-Maliki said on Monday, referencing the difficulty associated with the process of assembling a new governing coalition.
Forming a genuine "national partnership" is "a very difficult and tough process because you need to find a place in the government for everyone who participated in the elections and everyone who won," he noted.
U.S. President Barack Obama called the vote "a significant moment in Iraq's history and a major step forward in advancing national unity."
"I congratulate Iraq's political leaders, the members of the Council of Representatives, and the Iraqi people on the formation of a new government of national partnership," Obama 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. Their decision to form an inclusive partnership government is a clear rejection of the efforts by extremists to spur sectarian division."
Al-Maliki managed to present this partial government four days before his constitutional deadline would have ended.
The government composition is inclusive of Iraq's major ethnic and sectarian groups brought together by a fragile U.S.-backed power sharing deal agreed on last month.
But it is clear that sectarianism remains as the posts were divided along ethnic and sectarian lines.
The prime minister has three deputies, a Shiite, a Kurd, and a Sunni Arab -- representing the three largest entities in Iraq.
Saleh al-Mutlaq, who has been one of al-Maliki's critics, is the Sunni deputy. He had been barred from politics because of alleged ties to the Baathist party, the outlawed political movement of late Iraqi leader Saddam Hussein.
Parliament lifted that ban on Saturday.
Among the missing posts in the Cabinet are the key security ministries of Defense, Interior and National Security.
Officials needed more time to carefully fill those posts, and in the interim, al-Maliki will oversee those duties.
In other vacant ministries, such as Trade or Electricity, other ministers will serve as caretakers.
No women have been chosen for the Cabinet yet. Female lawmakers have expressed outrage and al-Maliki criticized blocs for not submitting the names of female candidates.
At the end of 2011, the United States is set to withdraw all of its troops from Iraq as part of a bilateral agreement with the Baghdad government.
It is too soon to predict whether that will happen or whether the United States and Iraq will negotiate an agreement to keep some U.S. soldiers there after next year.
There are about 48,000 U.S. troops in Iraq as of November, according to the Brookings Institution's Iraq Index. They work in an advisory and training capacity.
"Iraq faces important challenges, but the Iraqi people can also seize a future of opportunity," Obama said on Tuesday.
"The United States will 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.