The House of Commons on Wednesday voted 149-145 in favour of the motion by the minority Conservative government to extend the mission until February 2009.
The Canadian move to bring security to Afghanistan was, however, marked by a fresh Taliban attack on a town in the southern Afghan province of Helmand.
The several hours of fighting in the town of Mosa Qala left nine policemen and 16 Taliban fighters dead.
Amir Mohammad Akhundzada, the deputy governor of Helmand province, said: "It was the biggest attack [in Helmand] since the fall of the Taliban."
Also on Thursday, an American anti-narcotics adviser was killed when a vehicle carrying explosives hit his convoy in Afghanistan's main western city of Herat.
An Afghan interpreter was wounded in the attack, a spokesman for the interior ministry said.
Stephen Harper, the Canadian prime minister, said he had been concerned that the parliament vote might fail, although he had pledged to go ahead with a one-year extension of the mandate regardless of the outcome.
He also said some politicians had voted no, just to oppose his government.
"Support for the mission is a lot stronger than the vote," he said.
Canada has about 2,300 troops near the southern Afghan city of Kandahar, with a mandate to stay until February 2007.
Harper said Canada was volunteering to take general command of the Nato-led International Security Assistance Force (ISAF) for a year, likely to start in February 2008.
He also said Canada, which heads a smaller multinational brigade in Kandahar, would lead the brigade again for an additional six months next year. Gordon O'Connor, the defence minister, said this would start in November 2007.
Two small opposition parties, the Bloc Quebecois and the New Democrats, voted against the motion, but it drew enough members of the once-governing Liberal party to pass.
Harper said a Canadian officer was killed in combat against Taliban forces in Afghanistan on Wednesday. Captain Nichola Goddard was the 16th Canadian soldier to die in Afghanistan since Canada sent forces.
Nato forces assist the Afghan government in expanding its authority throughout the country, in security and reconstruction since US-led forces overthrew Afghanistan's Taliban government in October 2001.