The 18-page agreement takes effect when the UN mandate now governing the troops expires on December 31.
Ending the occupation
It will end the 2003 invasion of Iraq that toppled Saddam Hussein, then the Iraqi president, and plunged the country into chaos.
The agreement had already been approved by the cabinet a week ago.
The measure would govern some 150,000 US troops stationed in over 400 bases currently under a UN mandate, giving the Iraqi government veto power over virtually all of their operations.
The agreement is similar to so-called Status of Forces Agreements (Sofa) concluded with other US allies, but marks a major turning point in the relations between the two countries.
It is effectively a coming-of-age for the Iraqi government, which drove a hard bargain with Washington, securing a number of concessions - including a hard timeline for withdrawal - over more than 11 months of tough negotiations.
Iraq has also won the right to search US military cargo and the right to try US soldiers for crimes committed while they are off their bases and off-duty.
The agreement also requires that US troops obtain Iraqi permission for all military operations and that they hand over the files of all detainees in US custody to the Iraqi authorities, who will decide their fate.
The pact also forbids US troops from using Iraq as a launch-pad or transit point for attacking another country, which may reassure Syria and Iran, according to the official Arabic version of the pact, translated by AFP.
"That is where Prime Minister [Nuri] al-Maliki won," Hoda Abdel Hamid, Al Jazeera's Iraq correspondent, said.
"He got more of what the Iraqis wanted."
But the English version has not been made public, and US officials in Washington said there may be a dispute between the two sides over the interpretation of certain parts of the agreement.
"It's all in the wording, but it's also in the translation," Marwan Bishara, Al Jazeera's senior political analyst.
"In so many ways we have just moved from international status to a bilateral status where America with 150,000 soldiers and 400 bases will probably be able to dictate the interpretation of this agreement."
The vote came after a flurry of last-minute negotiations in which the main Sunni parties secured a package of political reforms from the government and a commitment to hold a referendum on the pact in the middle of next year.
Should the Iraqi government decide to cancel the pact after the referendum it would have to give Washington one year's notice, meaning that troops would be allowed to remain in the country only until the middle of 2010.
"The Kurds also got guarantees that Prime Minister [Nuri] al-Maliki will respect the federal system of the country," Al Jazeera's Hoda Abdel Hamid reported.
"They have been at odds lately with Baghdad over the fact that they thought the prime minister was centralising a bit too much governance in Iraq, and that really went against the constitution."
The pact was made possible in part by dramatic improvements in security over the past year, with US and Iraqi forces largely containing the violence and the chaos that erupted in the wake of the 2003 US-led invasion and Saddam's ouster.
But the accord has drawn fire from certain quarters, including followers of Moqtada al-Sadr, the Iraqi Shia leader, who reject any agreement with the US and who protested against the accord in Baghdad on Friday.
As the voting on the pact began several Sadrist MPs pounded tables in a bid to hinder the vote, chanting "Yes, yes to Iraq ... No, no, to the occupation," but the 30-member bloc failed to defeat the agreement.