The government's plans for detaining terrorist suspects have passed through the Commons after it announced a key change on the issue of house arrests.
The government has allowed two days of debate on the plans
Home Secretary Charles Clarke said he would amend the bill at its Lords stage so he would have to apply to a judge for a house arrest control order.
A cross-party bid to have all decisions on measures to control suspects made by judges was defeated by 267 to 253.
The bill was eventually voted through to the Lords by 272 votes to 219.
Opponents of allowing the home secretary to retain some decisions on terrorism control orders included 62 Labour MPs - two of them acting as tellers.
The new stance on house arrests had emerged before Monday's Commons debate in a letter to Mr Clarke's Tory shadow David Davis.
It angered MPs who called for a chance to debate on the planned amendment.
Downing Street denied the planned change was a concession.
This was because the home secretary would seek to grant police new powers to arrest and detain a suspect while a judge decided the issue, it said.
But up until Monday, the government had resisted pressure for judges to be responsible for making the orders.
Earlier, Mr Clarke had written to MPs explaining why he and not a judge should be responsible for granting a "control order".
As the debate on the Prevention of Terrorism Bill began, he said he had changed his mind but that he would not be tabling an amendment until the bill reached the Lords.
"I have come to the view that there is great merit in seeking as wide a consensus as is possible across Parliament.
"That is why I've come to the conclusion that I should move in this area."
The Lords amendment would better reflect "the strength of opinion that exists on all sides of the house".
Under Mr Clarke's proposed amendment, the home secretary would have to apply to a High Court judge for a control order - but only where this sought to impose house arrest.
The judge would then have to decide within 48 hours whether there was a case to make an order.
The move provoked condemnation from senior MPs on all sides and there were repeated calls for a full debate on the government's new plans.
Shadow attorney general Dominic Grieve said the committee stage of the bill had been "completely corrupted".
Instead of MPs being able to debate the amendments tabled, the house had been "hijacked" by the home secretary's change of heart.
At worst the plans would set up a "system of executive detention" and at best a secretive, "parallel system of justice", he said.
Liberal Democrat home affairs spokesman Mark Oaten said the home secretary's letter made a "nonsense" of the Commons proceedings.
He also urged Mr Clarke to allow any individuals accused of plotting terrorist activities to "see the evidence against them".
Mr Clarke wants house arrest and other powers to replace indefinite jail for foreign terror suspects which the law lords say breaches human rights.