The legislation, supported by 208 of the chamber's 327 members, was promptly rejected by Sunni Arab politicians and lawmakers who said it was evidence of what they called the "dictatorship" of the country's Shiite majority.
"The majority does not have the right to determine the fate of everyone else," Osama al-Nujaifi, one of Iraq's three vice presidents and a senior Sunni politician, told a news conference after the vote. "There should be genuine political inclusion. This law must be revised."
The law, tabled by the chamber's largest Shiite bloc, placed the militias under the command of Shiite Prime Minister Haider al-Abadi and gave militiamen salaries and pensions that mirror those of the military and the police.
In a statement, al-Abadi welcomed the legislation and said the "Popular Mobilisation" forces, the formal name of the militias, would cover all Iraqi sects, a thinly veiled reference to the much smaller and weaker Sunni tribal forces.
More From This Section
"The Popular Mobilisation will represent and defend all Iraqis wherever they are," al-Abadi said.
The vote comes at a time when the government is waging a major campaign to dislodge the Islamic State group from Mosul, Iraq's second largest city and the last major urban centre still controlled by the extremist group.
The Shiite militias, most of which are backed by neighbouring Iran, have been bankrolled and equipped by the government since shortly after IS swept across much of northern and western Iraq in 2014.
Many of these groups existed long before IS emerged, fighting American troops in major street battles during the US military presence in Iraq between 2003 and 2011.
Iraq's Sunni Arabs and rights groups have long complained that the militiamen have been involved in extra judicial killings, abuse and the theft or destruction of property in areas where they drove out IS. The militias' commanders, however, deny the charges or insist that the excesses are the work of an isolated few.