The House of Commons voted narrowly on Wednesday night to extend Canada's military deployment in Afghanistan by two years, giving Prime Minister Stephen Harper a foreign policy victory but only after an emotional and deeply partisan debate.
The vote, on a motion by the new Conservative government, passed 149-145. But the objections expressed by many in the three opposition parties reflected increasing wariness among Canadians about their largest combat operation since the Korean War.
The risks of the Afghanistan mission were underscored by the death of a female army captain in combat against Taliban insurgents only hours before the vote.
Canada has 2,300 troops in Afghanistan and has been active in the US-led mission since the invasion of the country shortly after the Sept. 11, 2001, terrorist attacks on the US. In recent months Canadians have taken command of NATO operations around the city of Kandahar, an area where Taliban insurgents are aggressive, and casualties have been mounting.
The Canadian commitment was to end next February, and opposition legislators wondered aloud about the reason for the hurry to extend it. The new Conservative government's motion to do so came as a surprise.
Harper said the Afghans and Canada's allies needed to know Ottawa's intentions well in advance. But he may also have been trying to commit parliamentary support to the mission before it became widely unpopular.
"We've had a gun put to our heads," said Bill Graham, the Liberal Party leader, who served as foreign minister and defense minister in the last Liberal government, which fell in the January elections.
"Independent countries need leaders, not pollsters," Harper told the House of Commons. "We just cannot sit back and let the Taliban or similar extremist elements return to power in Afghanistan."
The vote was nonbinding, but it would be difficult for a government with a minority and shaky control of the House of Commons to sustain a major military deployment without parliamentary support.
If Harper had lost the vote, he said, he would have unilaterally extended the commitment for only one year and presented the issue to parliament again. He said he might then have gone to the Canadian people for their consent on a longer commitment, implying that he might have moved to dissolve parliament and hold new elections over the issue.
The left-leaning New Democratic Party and the separatist Bloc Quebecois opposed the government motion. The Liberal Party, which sent the troops to Afghanistan when it was in power, was deeply divided.
Sixteen soldiers and one Canadian diplomat have died in the Afghanistan fighting. Captain Nichola Goddard, who died on Wednesday, was the first Canadian woman to die in combat since World War II.
In his speech to parliament, Harper singled out the Taliban for their "dark and backward vision."
He added: "What they deliver is hell on earth."
In what appeared to be an attempt to control negative images, Harper has stopped flying the flag at half-staff for Canadian troops killed in Afghanistan and limited news coverage of the return of bodies from the conflict.