The rebuff on the 90-day proposal in the Terrorism Bill by a margin of 31 votes was the Government's first defeat in the House of Commons since Labour came to power in 1997.
The Prime Minister had left absolutely no doubt of his personal commitment to 90-day detention, and its rejection by 322-291 is a significant blow to his authority, which some believe may bring forward his departure as Labour leader.
In dramatic scenes at the House of Commons, after rejecting the Prime Minister's preferred option, MPs delivered a second blow by backing a proposal for a 28-day maximum detention period by 323-290, a majority of 33.
Mr Blair was in the chamber and sat grim-faced, shaking his head as the result was announced. Earlier, at question time, he took the unusual step of issuing a direct appeal to wavering MPs on both the Opposition and Government benches to back him - insisting it was their "duty" to do so and act "responsibly".
The Conservative leader Michael Howard had insisted that police had failed to make a case for 90 days' detention, which he warned could alienate Britain's Muslim communities.
After the defeat, he said that Mr Blair should consider resigning. He said the Prime Minister's authority was "diminished almost to vanishing point. This vote shows he is no longer able to carry his own party with him."
Liberal Democrat President Simon Hughes told BBC News 24: "It is a momentous day, it is the first defeat of this Government since Tony Blair became Prime Minister. It was a decisive Government defeat, and the Prime Minister put all his authority and that of his Government on the line at Prime Minister's Question Time only four hours before.
"Even objective observers would say that this is a phenomenal defeat of the Government on a major issue of the day. I think it has to undermine the Prime Minister's credibility."
The Chancellor Gordon Brown and the Foreign Secretary Jack Straw had been ordered to cut short high-profile trips overseas to boost numbers going through the Aye lobby. Party chairman Ian McCartney attended Parliament for the first time since having heart surgery in order to vote.
But their presence was not enough to offset a rebellion by Labour backbenchers, who joined Conservatives and Liberal Democrats to overturn the Government's 66-strong majority.
* The bookmaker William Hill shortened the odds against him leaving office before the end of next year from 3-1 to 7-4. Hills also lengthened the odds against him beating Margaret Thatcher's record eleven-and-a-half years in office from 3-1 to 5-1.Reuse content