BAGHDAD, Iraq (CNN) -- Iraq's parliament on Tuesday approved a resolution that will allow non-U.S. foreign troops to remain in Iraq after a U.N. mandate expires at the end of the year.
The resignation of Iraqi parliament Speaker Mahmoud al-Mashhadani cleared the way for the foreign troop deal.
Shiite lawmaker Ridha Jawad Taqi and Kurdish lawmaker Mahmoud Othman told CNN about the vote, which came after an impasse in parliament over the fate of its speaker threatened to delay the resolution -- which had to be adopted by December 31.
Iraq's main political parties hammered out the resolution Sunday. A separate, previously approved agreement authorizes U.S. troops to remain.
Britain has the second-largest contingent of troops in Iraq -- about 4,100 -- after the United States, which has about 142,500. Other countries covered under the new resolution -- El Salvador, Australia, Romania and Estonia -- have several hundred troops in the country combined.
The resolution authorizes Iraq to negotiate bilateral agreements with the other countries. If it had not been approved by the end of the year, those countries would have been in Iraq illegally.
Britain and Iraq announced last week that British troops would begin leaving Iraq in May 2009, while a "handful" of British military personnel would remain after that date to continue naval training for Iraqi sailors, primarily to protect oil platforms.
Parliament members had been upset with Speaker Mahmoud al-Mashhadani, who angered lawmakers for comments regarded as inappropriate. There had been moves in the parliament to have him ousted from his job.
Osama al-Nujaifi, a Sunni lawmaker with the Iraqi National List, said that al-Mashhadani submitted his resignation in a closed-door emergency session Tuesday before Iraq's 275-member Council of Representatives.
The official said most parliament members accepted the move. Al-Mashhadani also gave up his seat in parliament and announced his retirement as well.
In violence in Iraq on Tuesday, a roadside bomb killed an Iraqi police colonel, his wife and three other officers in the city of Tarmiya, about 18 miles (29 kilometers) northwest of Baghdad, an Iraqi Interior Ministry official said.
Two Iraqi police officers also were injured in the blast, the official said. The wounded were taken to a hospital for treatment, the U.S. military said in a release.
Lt. Col. Ismail Faisal, who was killed in the bombing, was the head of al-Abaichi police station in Tarmiya, the Interior Ministry said.
CNN's Mohammed Tawfeeq, Jill Dougherty and Yousif Bassil contributed to this report.