The House of Commons on Wednesday soundly defeated an anti-terrorism measure championed by Prime Minister Tony Blair, dealing him one of the most significant political setbacks of his eight years in office.

The lower house of Parliament voted 322 to 291 against a proposal to allow suspects in terrorism cases to be held for as many as 90 days without charge, up from the current 14. It was Blair's first loss in a major vote in that house since he took office in 1997.

Critics likened the measure to the policies of apartheid-era South Africa. But Blair called it crucial to national security and campaigned intensely for it. He worked privately to rally skeptical legislators from his ruling Labor Party and recalled two top cabinet members, Chancellor Gordon Brown and Foreign Secretary Jack Straw, from overseas trips to be present for Wednesday's vote.

In the end, 49 members of his party deserted him, a record number in a Commons vote.

Later in the day, legislators agreed to increase the time suspects can be held to 28 days and approved language in Blair's anti-terrorism package to create the crime of "glorification of terrorism." The bill also has provisions to toughen penalties for terrorist-related activities and widen government powers to ban organizations deemed to support terrorism.

But all political attention focused on the defeat of the 90-day proposal, on which Blair had expended much political capital. The vote adds to his burdens as he faces growing questions about his ability to govern.

After his party won its third consecutive election in May, albeit with a smaller majority than in the past, Blair said he would step down at some point before his current term concludes. Brown is almost universally seen as his likely successor.

Blair has been the White House's most important ally in the Iraq war, committing about 8,500 troops and sometimes functioning as de facto spokesman for the foreign coalition there. But the war remains extremely unpopular in Britain and has helped drag his approval ratings down.

In the past week, a key ally of the prime minister's has resigned from the cabinet and the former British ambassador to the United States has released a book critical of Blair.

"He's no longer Teflon Tony -- he's mortal," said Peter Riddell, political columnist for the London newspaper the Times and author of several books on Blair and British politics.

Riddell said the defeat was not politically fatal for Blair, but the "remarkable" defection of so many Labor legislators meant that Blair would have a hard time pushing through his ambitious domestic agenda, which includes reforms in education and health. "He's now at the mercy of Parliament," Riddell said.

Conservative Party leader Michael Howard immediately called for Blair to resign, telling reporters that "this has so diminished his authority." Charles Kennedy, leader of the third major party, the Liberal Democrats, said Blair would be "increasingly seen as a lame duck, and lack conviction, credibility and the persuasion that a prime minister needs."

Ann Cryer, one of the Labor members of Parliament who broke ranks, said that she "hated" voting with the Conservative Party against Blair, but that she believed that holding people without charge for 90 days was excessive. She said many Muslims live in her district in West Yorkshire and strongly oppose the law on grounds that it could be used against them unfairly.

"I don't think Tony should stand down as a result of this," Cryer said. "I know he's angry and hurt, but it's a tough old game, politics."

Blair was defiant in defeat Wednesday evening, saying in a BBC interview that, "We were trying to do the right thing for the country."

"What I can't understand," Blair said, "is how we can say, given the strength of the terrorist threat we face, that the civil liberties of a small number of terrorist suspects . . . come before the fundamental civil liberty of this country to protection from terrorism."

"I think it was a wrong decision," Blair said of Wednesday's vote. "I just hope at a later time we don't rue it."

The measure was part of a package of anti-terrorism measures Blair introduced following the deadly subway and bus bombings in London in July.

During a heated exchange in Parliament earlier Wednesday, Blair declared that voting for the measure was "the duty of every member of this house." As he spoke, Conservatives shouted "police state" at Blair, in a session that was testy even by the raucous standards of the House of Commons.

Blair stood by his conviction that the 90-day period was necessary in an era when terrorists use increasingly complex and sophisticated methods. British police officials lobbied for the measure, which polls showed was supported by a majority of the British public.

But a wide range of civil libertarians resisted, saying the measure sacrificed too much personal liberty in the name of security. Leaders of Britain's 1.6 million Muslims also had preached against the provision in mosques.

Blair rejected concerns about the erosion of civil liberties, saying that the proposal called for a judge to review all detentions every seven days. As evidence of the terrorist threat against Britain, the prime minister said Wednesday that police had foiled two planned attacks since the July bombings.

Many analysts believed that Blair's recent insistence on 90 days was merely a bargaining position to rally support, and that ultimately he would compromise rather than risk defeat. But Blair ended that speculation Wednesday, declaring, "Sometimes it is better to lose and do the right thing than win and do the wrong thing."

Prime Minister Tony Blair is facing questions on his ability to govern.