Civil liberties campaigners have vowed to continue fighting the government's plans to hold secret court hearings for cases of sensitive national security after MPs rejected stronger safeguards.
Ministers comfortably saw off a bid to reinstate amendments made by the House of Lords, in what opponents called a "dark night for British justice".
Several prominent Labour ex-ministers defied their own party's position to back the government in last night's vote on controversial elements of the Justice and Security Bill.
An attempt to make judges balance national security against the public interest of open justice was defeated by 297 votes to 226, majority 71.
Minister Kenneth Clarke insisted the measures were essential to enable sensitive intelligence material to be introduced in a small number of civil cases where the state is being sued.
The alternative, he said, was that the government would be unable defend the action and could be forced to pay out millions in compensation - as happened with a series of former Guantanamo Bay detainees.
The defeated changes, originally passed in the House of Lords only to be reversed by the government in the Commons committee going through the Bill line-by-line, would have made the legislation impossible to operate, he said.
Critics complain though that CMPs undermine the principle of open justice and allow the security services to cover up involvement in abuse and torture.
Shadow justice secretary Sadiq Khan told the Commons that while he accepted the difficulty of "reconciling the issues of justice and security" the legislation was not "proportionate to the scale of the problem".
Among prominent Tories backing the amendments was Andrew Tyrie who said they were "about whether people can get to hear the case made against them, and whether we can keep legal safeguards we have had for generations".
Analysis of division lists revealed seven Liberal Democrats rebelled to support the public interest test amendment, including party president Tim Farron, deputy leader Simon Hughes and former minister Sarah Teather.
The vote came after former Lord Chief Justice Lord Woolf said the legislation already ensured the operation of closed material proceedings was under the "complete control" of the judge in any case.
The issue is set to provide a renewed confrontation this weekend between Deputy Prime Minister Nick Clegg and his party activists - who last year voted overwhelmingly to oppose the legislation - at the Lib Dem spring conference in Brighton.
Labour former foreign secretary Jack Straw backed the legislation, however, telling MPs it was about "how you protect the sources of information on which intelligence depends".
Party colleague Hazel Blears, a former counter terrorism minister, also gave her support.
Shami Chakrabarti, director of Liberty, said last night: "History teaches that politicians abandon ancient legal principles at their peril. Today's cover-up is tomorrow's scandal.
"The opposition to turning British courts into secret commissions continues. Once again, we look to the House of Lords to defeat Secret Courts and defend the Rule of Law."
Clare Algar, executive director of Reprieve, said: "This has been a dark night for British justice.
"These plans for secret courts were always dangerous and unnecessary, but the failure of even minor attempts to modify the Bill means that it is even worse than when it first reached the House of Commons.
"MPs must now vote against the Bill altogether if they want to defend British justice.
"Should that fail, the House of Lords will be the only thing standing in the way of plans which would mean the end of the right to a fair trial in a vast range of civil cases."
A Conservative Party source said: "By opposing this Bill, Labour are prepared to accept the possibility of millions of pounds going without challenge to individuals who could be terrorists.
"This raises the appalling prospect of taxpayers' cash funding jihadist groups."
Pointing to the presence of former Labour home office ministers Paul Goggins and George Howarth among those voting with Mr Straw against the amendments, they said: "This shows that under Ed Miliband the Labour Party is more interested in playing politics than acting as a serious alternative government."