Ministers say Parliament will improve scrutiny of terror detentions
Plans to extend terror detention to 42 days could undermine the independence of judges and lead to the collapse of trials, peers have warned.
The Lords constitution committee said letting Parliament vote on whether to allow extensions in the pre-charge time limit beyond 28 days was "muddled".
This would create a "recipe for confusion", rather than a "system of checks and balances", it added.
The Home Office said the changes would protect people and civil liberties.
The House of Commons backed plans to increase pre-charge detentions for terror suspects to 42 days in June.
The proposal - opposed by the Conservatives and Liberal Democrats - passed by just nine votes, after Democratic Unionist Party MPs backed the government.
This part of the Counter-Terrorism Bill is expected to face more opposition in the Lords when Parliament returns from the summer recess.
Under the legislation, MPs and peers would vote on whether to grant a temporary "reserve power" for the home secretary, allowing courts to authorise detention for up to 42 days if there was an operational need.
Although the reserve power order would not be specifically about an individual case, politicians would "have to tread a tightrope" to avoid prejudicing any trial, the committee said.
The report said: "We are unconvinced that the government have properly thought through this aspect of their proposed scheme."
The committee also said it was concerned that a judge could have to decide whether to extend a suspect's detention within hours of a "highly politically charged debate" in Parliament.
The report said: "There is a risk that this will be perceived to undermine the independence of the judiciary."
The government's desire to increase democratic accountability was "understandable", but risked "conflating the roles of Parliament and the judiciary, which would be quite inappropriate".
The peers added: "Far from being a system of checks and balances, this is a recipe for confusion that places on Parliament tasks that it cannot effectively fulfil and arguably risks undermining the rights of fair trial for the individuals concerned."
The committee said plans for the home secretary to give secret privy counsellor briefings about the need for reserve power orders to the chairmen of three key parliamentary committees were "untenable" and should be scrapped.
The peers also said the "elaborate" decision-making process would give a far greater opportunity for legal challenges to arise.
They expressed concerns about the home secretary being given power to direct that sensitive inquests should be heard without a jury.
The committee's Conservative chairman Lord Goodlad said politicians would be asked to act in a "quasi-judicial manner" in deciding whether to extend the limit beyond 28 days.
"Considering that any debate will be highly political in nature and any vote may well be whipped by the political parties, we are deeply concerned that the independence of the judiciary may appear to be undermined and that trials may be prejudiced," he said.
Shami Chakrabarti, director of human rights group Liberty, said the report made "devastating holiday reading for ministers".
"In an attempt to sugar-coat the 42-day detention plan, their Bill would have politicians voting on individual cases - it's constitutionally illiterate and proof that desperate politics makes bad law," she added.
Meanwhile, shadow home secretary Dominic Grieve said the government should "abandon" the measure and concentrate on delivering things that would make the UK "safer", such as allowing the use of intercept evidence in terror trials and establishing a dedicated UK Border Police Force.
Liberal Democrat home affairs spokesman David Howarth said the proposal had "everything to do with politics and nothing at all to do with the struggle against terrorism".
"It should be dropped immediately," he added.
But Home Office Minister Tony McNulty argued the proposals struck "the correct balance between the right of everyone in the UK to be protected from terrorism and the need to preserve individual civil liberties".
He added: "We will consider carefully the committee's comments on the role of Parliament in relation to pre-charge detention.
"We believe, however, that it is right that Parliament should have the opportunity to fully debate and approve the bringing into force of such an exceptional power."