By Emma Griffiths and Justin Parkinson
(All times are BST)
1908: All sides seem to agree on one thing, at least: the fight over 42 days - despite the MPs' vote in favour - is far from finished. Thanks for joining us today and see you again for prime minister's questions, as they happen, next Wednesday.
1905: Lord Carlile, the government's independent review of terror laws, says: "I'm satisfied that Parliament has done the right thing today. I've consistently said that this very highly protected new law is needed. Of course it now has to go to the House of Lords and be debated afresh there and the government will certainly have difficulties in the House of Lords."
1850: DUP MP William McCrea tells Sky News"hand on heart" that his party voted "on principle" and in the national interest.
1849: Mike Blakemore of Amnesty International says the government's concessions to win the vote on terror detentions are "essentially meaningless".
1848: The bill wins a third reading by 315 votes to 78 - a majority of 237.
1841: MPs are now voting whether to give the Counter-Terrorism Bill as a whole a third reading. If they back it, it will go before the House of Lords.
1840: Shadow home secretary David Davis says it "wasn't the argument that won the day - it was the whips' office" and the government lost the argument "hands down".
1838: Former Labour cabinet minister Tony Benn says the vote is "Bin Laden's biggest victory", adding that it is a "bad law, bad for us, bad for the people and for Britain's position in the world".
1837: "Only Clauses 1, 9 and 29 of the Magna Carta remain unrepealed. Clause 29 says that no freeman shall be taken or imprisoned or have his liberties removed but by lawful judgment of his peers. Detention for 42 days without trial essentially abrogates this clause and removes 800 years of a basic civil liberty: the right to due process."
Matt Platts, Reading, UK
1835: Lib Dem leader Nick Clegg says it is a "very sad day indeed for the great tradition of liberty that this country has represented". He adds that he will be "depressed" if the DUP backed Mr Brown for reasons other than principle. He predicts the Lords will vote against it, resulting in parliamentary ping-pong, as the two houses send the bill back and forth to one another.
1832: Tony Lloyd, chairman of the Parliamentary Labour Party, says the result leaves the government "very much in tune with what the nation wants" and accuses other parties of acting "opportunistically".
1829: Labour rebel John Grogan tells Sky News this is the "worst possible result for the government", showing the "strength of the principles" of those who defied the whips. He says the Lords are "going to savage this legislation" and that "it would have been better [for the government] had it lost".
1822: Sources tell the BBC there were 37 Labour rebels, which would have been enough to defeat the government, had no MPs from other parties given Mr Brown their backing.
1821: Mr Brown "only delivered because of backroom deals" with the DUP, in particular, and some Labour backbenchers, BBC political editor Nick Robinson says.
1819: Amid much shouting, the Speaker upbraids a Tory MP for shouting at someone who voted with the government. He tells the Conservative benches that an MP is free to vote according to his or her conscience.
1819: The majority is just nine votes - with ministers winning by 315 to 306.
1818: The government has won.
1815: All nine DUP MPs have reportedly voted with the government, making a defeat for Mr Brown far less likely.
1813: News reaches us that the DUP MPs were in the government lobby - suggesting they backed the 42-days plan.
1812: The chamber is absolutely packed, and very noisy.
1809: The Speaker shouts: "Lock the doors." A result is imminent.
1806: The Commons is a mass of noisy activity, as MPs head to and return from the lobbies. Still there is no firm indication of how the nine DUP MPs are voting.
1800: MPs have now finished the debate and are voting on government amendments to the Counter-Terrorism Bill including giving the home secretary the right to extend the limit on holding terrorism suspects before they are charged beyond 28 days.
1758: Home Secretary Jacqui Smith says she cannot "wish away the threat" of those whose sole aim is to "blow away our citizens". She says MPs have to ask themselves if they are confident no police inquiry would have to hold people beyond 28 days. She asks MPs to "do the right thing to protect our people".
1756: Ms Smith says it has been a "disappointment" that MPs have said there can be no "appropriate role for Parliament in this process" - several MPs have raised concerns about the "blurring" of lines between Parliament and the judiciary.
1752: She says claims that individuals held up to the current limit had been charged on the basis of evidence that was available days before is a "pretty scandalous slur" on the Crown Prosecution Service and the police. She says nobody can be detained unless it was necessary for the purposes of gathering evidence.
1749: As the time for the vote on extending the pre-charge detention limit for terrorist suspects approaches, Home Secretary Jacqui Smith says Parliament had shown how it was a "formidable defender" of liberties and protections to ensure everyone in Britain could enjoy them.
1747: I think that in a debate of such importance it is a shame the House of Commons is so empty. I think it shows that arm-twisting and bribes, not rhetoric or argument is more important to MPs.
George Faux, Birmingham
1742: Labour MP Frank Cook, who has been deselected by his local party, says he has been put under pressure to vote with the government. He says he has been accused of seeking to "take revenge as a result of the treatment I have received since 1997" and of trying to bring down the government.
1739: Labour MP for Stockton North Frank Cook says the only representation he has received to vote in favour of the plan had been a text asking him not to oppose the government because of the risk to the "three marginals in Teesside". "Marginals should not even enter into this debate," he says. "This is a matter of principle".
1737: Liberal Democrat MP David Heath describes those Labour MPs who supported 90 days and now support 42 days as "nodding heads" many of whom would support any figure.
1732: May we extend the period to 42 days, improve control orders and officially approve water boarding and all other non-deadly forms of torture. Terrorists give up their human rights when they breach the rules of conventional warfare. If someone can give me a valid reason as to why terrorists deserve the same rights as those they kill, I may change my views
Jack Richards, Dartford, Kent
1730: SDLP leader Mark Durkan says "we have seen how counter terrorism powers have been counterproductive in the past". He tells MPs: "Do not feed what you want to fight and do not destroy what this House ought to defend."
1729: No other countries need 42 days, and many of those are just as under threat as we are. In my opinion if the security services can't build a convincing case in one week then they have no right to detain anyone. Perhaps the mooted £3,000 per day compensation should kick in after 7 days.
Peter Shepherd, Hull, UK
1658: A source tells the BBC that DUP leader Peter Robinson and a number of his MPs have just left a meeting with the prime minister. There are nine DUP MPs in Westminster and their votes could prove crucial, if sufficient Labour MPs rebel against the government's proposal to extend pre-charge detention.
1658: Labour MP Martin Salter, a member of the Home Affairs committee, says it is better to legislate in a "moment of calm" than in the immediate aftermath of a terrorist attack. He says it's a "bit too late if we end up letting somebody out" who goes on to commit a terrorist attack. Quoting police figures on terrorism cases, he says there is "absolutely no doubt that terrorist networks have become more sophisticated" and adept at using communications technology.
1646: Labour backbencher Diane Abbott says rebel MPs have been put under incredible pressure to vote with the government: "People who the prime minister has never spoken to in his life have been ushered into his presence twice in the past 48 hours". She says any rebel "backbencher with a cause" who supports the government can now be confident that Mr Brown "will make the statement, give the money, make that special visit" but asks: "Is it right that our civil liberties should be traded in this kind of bazaar?"
1639: Labour's Diane Abbott says the debate is about "positioning" and "putting the Conservative Party in the wrong place on terrorism".
1635: Sir Menzies finishes by referring to the various police and legal experts who have spoken in favour or against the plan to extend pre-charge detention to 42 days. He urges MPs not to be "moved by the opinions of others on an issue of this kind", but to look to their own judgement.
1634: "Once freedoms of this kind ... are removed or diminished, they are not easily recovered," warns former Lib Dem leader Sir Menzies.
1630: Sir Menzies says concessions offered are "political boilerplate" which leave too much to the discretion of the home secretary, are complicated and ambiguous and "blur the distinction between the responsibility of Parliament and the administration of justice".
1628: Sir Menzies asks about concessions reportedly offered to win over MPs - including possible deals over the miners' compensation scheme and a relaxation in sanctions against Cuba - saying they were worthy issues but asks "what the devil" they have to do with anti-terrorism laws. He says he hopes the stories are the product of a fevered imagination.
1625: Former Lib Dem leader Sir Menzies Campbell says the government is "profoundly mistaken" in its proposals which are wrong in "both principle and practice".
1623: Labour MP for Blackpool South, Gordon Marsden, says he believes the government has "moved significantly on these issues and on giving safeguards".
1613: As the debate continues, the DUP says the "security of the United Kingdom and its citizens" will be its "prime consideration" in deciding whether to support the 42-days proposal. If the government is unable to persuade sufficient Labour rebels to support the plan, the nine votes of DUP MPs could prove crucial if it is to win the vote.
1611: At a briefing, the prime minister's spokesman says the word from the Whips' office is 'if the vote was held now on 42 days we would lose'. He says the prime minister is working in Downing Street and meeting "a wide range of parliamentarians" on 42 days.
1610: Plaid Cymru's Mr Llwyd, in reference to comments by former Met chief Lord Stevens in support of the 42-day plan, asks whether the government are using him as an "outrider to avoid having to 'sex-up' evidence as they did with the Iraq dossier?".
1607: Labour backbencher Kate Hoey says it is "really wrong" to suggest that compensation will make up for six "weeks of your life" - a reference to the latest government offer of an "ex gratia" payment to those held beyond 28 days, then released without charge.
1606: For the Conservatives Dominic Grieve says the conditions of being held in pre-charge detention are particularly stressful and in at least one case, there had been concern about the mental health of the person held.
1601: Mr Llwyd, Plaid Cymru's leader in Westminster, says the 42-day plan does not equate to internment of the kind seen in Northern Ireland, but the "same tensions come into play".
1556: Plaid Cymru's Elfyn Llwyd says he recognises the government has a "very difficult job to carry out". But he says today's problems cannot be addressed "simply by eroding civil liberties".
1551: Asked about the prospect of innocent people being locked up, Labour's Dari Taylor says a terrorist only has to be "lucky once", so "sometimes the balance of the law to protect the individual has to be very clearly seen".
1547: "We did this in the 70's in Northern Ireland, it didn't work then and I doubt it will work now. We should learn from history. The debate should be on how we continue to maintain high levels of intelligence not on extending the detention times".
R Duncanson, Andover
1543: Labour's Dari Taylor, who was on the Counter-Terrorism Bill standing committee and supported the attempt in 2005 to extend the limit to 90 days, says she has taken a lot of time over this Bill to "garner the evidence available". She said she better understood the capabilities of groups who plotted terrorist attacks and had found the evidence "quite compelling".
1536: Mr Mates says the government tried to "buy off the usual suspects" - a reference to Labour rebels - with various concessions - including the one that any decision would go before Parliament, but had made the Bill worse. He says it "does not have a chance" of standing up to scrutiny in the House of Lords.
1535: He says the government should be taken out of the decision on whether to extend an individual's detention, if public trust is to be maintained.
1532: Mr Mates says the prime minister had been wrong to say the security service had wanted an increase in the limit - saying the director general had been very clear in saying M15 had never advised the government on pre-charge detention. He said the executive - the government - "has quite enough power" and it should be for the judiciary to decide on such cases.
1530: Conservative MP Michael Mates, a member of the intelligence and security committee, says not concrete evidence has been offered that an extension to the pre-charge detention limit for terrorist suspects has not been offered.
1529: Deputy speaker Michael Lord asks MPs to keep their comments as brief as possible, because so many want to speak.
1529: "This is not a deterrent to terrorism it's an investigation tool," Mr Dismore says. He adds it could make things worse. "The government have not made the case for the need in my view," he says.
1510: Labour MP Mr Dismore says the 7 July bombings had been dealt with under the "14-day regime". "The power is not meant for exceptional cases, but for the sort of cases that have been dealt with adequately so far under existing powers."
1509:Conservative MP Anne Main asks for evidence that 42 days are needed, saying it "appears to be a figure plucked out of the air".
1507: Mr Dismore says there is no evidence of any suspected terrorists being released when they should not have been under the existing limit, and says the full 28 days has not been used for a year - and very rarely used at all.
1506: Mr Dismore says the director general of M15 had not been prepared to give evidence to his committee - and had not responded to requests for his assessment of the increased threat.
1504: Mr Dismore, a Labour MP, says there have been assertions of a growing threat, but not qualitative analysis - he says there is a threat, but it is important not to over-hype it and recent plots had been "rather amateurish affairs".
1503: Andrew Dismore, chairman of the joint human rights committee, says he backed the 90-day plan but had since changed his mind. He said the proposals for 42 would not make us safer, but risked alienation within British society.
1459: Mr Huhne says those who believe there are genuine safeguards in the are misplacing their faith and concludes: "We must never become what we are fighting"
1457: Mr Huhne says, despite "so called safeguards" - the decision about whether the conditions to allow an extension of the detention limit have been met would still be a matter for the home secretary. He says the definition given could mean a grave exceptional terrorist threat "in Tonga" could be used to justify an extension in the UK.
1453: Mr Huhne says centuries-old freedoms should not be done away with, because of a hypothetical case - the government says while 28 days has been sufficient so far, a longer limit may be needed at some stage in the future.
1451: The Lib Dem home affairs spokesman says Britain's highest ranking Muslim police officer Tarique Ghaffur has said the measures could prove counter-productive, as internment had been in Northern Ireland.
1442: Mr Huhne says: "No other common law country has seen the need to do such violence to our freedoms."
1441: Mr Huhne says tools available to the police have been expanded, to help police cope with huge amounts of data - one of the arguments for extending the existing limit is the increasing complexity of terrorist plots.
1440: Labour's Diane Abbott says holding someone for six weeks is "coercive".
1438: Mr Huhne says of six people who have been detained close to the existing limit of 28 days, half have been released without charge. He said those three people had spent a month of their lives "not even knowing what they were accused of committing". He said the police do a "commendable job in difficult circumstances" - but they are human and they are fallible, which is why checks and balances are "crucial".
1436: Lib Dem home affairs spokesman Chris Huhne says the powers requested by the government are "excessive" and may act as a "recruiting sergeant for extremists".
1433: Mr Vaz says the police have made the case for longer maximum detention periods for terror suspects.
1430: SDLP MP Mark Durkan asks what can be said to the families of those who are detained to persuade them of the case for 42 days. Mr Vaz says there will be "redress" if people feel unfairly treated.
1427: Amid a lively atmosphere, with several MPs shouting and laughing, the deputy speaker calls for "decorum" in the debate.
1426: Mr Vaz says his committee has concluded that the Civil Contingencies Act is not suitable for this purpose.
1425: Tory Patrick Mercer says there are powers in the Civil Contingencies Act which could be modified to deal with "exceptional circumstances", rather than introducing 42 days.
1421: Mr Vaz gives way to Ms Abbott, who asks him to explain how Parliament can scrutinise terror detentions without being presented with the facts. Mr Vaz says he is "not easily satisfied".
1421: Labour's Diane Abbott repeatedly urges Mr Vaz to give way - but, for the time being, he refuses.
1416: Labour's Jeremy Corbyn, one of the expected rebels, says that if the plans for a maximum of 42 days' detention are passed, a future home secretary will want "more than that".
1413: Mr Vaz, to laughter, says a knighthood was "certainly not offered" to him for his support for the government's plans.
1412: Mr Vaz has a "slight dig" at the home secretary, saying she should have consulted MPs on police pay - the cause of a recent dispute - in the way that she has over terror detention plans.
1411: Labour MP Keith Vaz, chairman of the Commons home affairs select committee, says it is "right that we should be engaging with organisations like Liberty" when looking at terror-related matters.
1410: "How about, if there is no conviction, the police officers investigating are jailed for 42 days?"
Mark, Exeter, UK - via email
1406: With less than four hours to go until MPs vote on the big issue, the gossip around Westminster is that Prime Minister Gordon Brown is meeting potential Labour rebels in a final push to get them on the government's side. The Commons chamber - as is usual after a debate has been going on for more than an hour - is beginning to empty somewhat. How many are going to Downing Street?
1402: Labour's Diane Abbott, who has spoken out against the government's plans, says that if the 42-day maxim mum pre-charge detention gets on the statute book as it stands, it could become "routinised".
1359: Mr Davis says the House of Commons "is not a court - it cannot be and it should not be". He says many chief constables not quoted by the home secretary think 42 days "is a very dangerous measure".
1356: "I am disgusted to hear that some Labour MPs will vote "aye" on the basis that GB will denounce sanctions against Cuba etc. The Labour Party really has no principles left."
Bob, Larbert, Scotland - via email
1352: Mr Davis says the use of intercept evidence in court is not an infringement of civil liberties, but that the infringement happens when the intercept is made, which is why safeguards are in place.
1343: Mr Davis says the home secretary must "check" evidence given to her by law enforcement experts before making judgements/
1339: The government's offer of compensation for innocent people held beyond 28 days is an "explicit admission of the inevitable failure" of the 42-days plan, Mr Davis says.
1337: Mr Davis says the longer people are held without charge, "the more likely they are to turn out to be innocent".
1335: Former home secretary David Blunkett says 42 days allows for the "most serious cases", and it is a "paradox" that those against the proposal are in favour of laying lesser charges to hold people in custody until they are charged with greater offences.
1333: Mr Davis says he would rather police "sleep in the office for two weeks" to gather evidence and question suspects, rather than having "innocent people being detained in a cell for six weeks".
1331: Mr Davis says the number of terror plots detected has decreased. This is a "good thing" but not an argument for longer pre-charge detentions, he argues.
1328: Shadow home secretary David Davis says detention without trial is "one of the defining debates" of the last decade. He cites the Magna Carta, arguing that "liberty is the common strand" uniting the Conservatives and Lib Dems. The case for 42 days has "first crumbled, then collapsed".
1326: Ms Smith says terrorism is "an assault" on civil liberties, adding that people cannot be "lulled into a false sense of security" and that "getting the balance right between individual freedom and our response" is vital. She tells MP that "I hope we never need" to use detentions of up to 42 days, but the "time has come for honourable members in this House to decide" and give police "the tools" to defend life.
1323: Ms Smith says home secretaries think "very carefully" before making points to Parliament.
1319: Lib Dem MP Simon Hughes says the powers of the state over the citizen have been repeatedly increased over the last few years - yet have not been in other countries facing a similar level of threat.
1317: Labour MP Martin Salter says it would have been preferable with the debate on extending the detention to 90 days if the same safeguards were included - he says there is "no excuse" for MPs who backed the 90-day plan to have "serious reservations about what is proposed today". Ms Smith says the threat is now greater and she hopes for maximum support.
1316: The Liberal Democrat peer, Shirley Williams, tells the BBC it is likely that the 42 days measure will be rejected by the House of Lords: "There's a very, very strong support for our traditional civil liberties in the Lords, and a great many people, like former law lords, who know what they're talking about ... In addition to that, I think it's fair to say that there's the real problem of the European Convention on Human Rights, because it questions whether a fair trial is possible."
1314: Speaker Michael Martin says there are so many interventions by MPs some are finding it hard to hear what Ms Smith is saying.
1312: Shadow home secretary David Davis asks why she has not made the government's position subject to a judicial review, telling backbenchers it is "not the way forward" - Ms Smith replies that there is an important role for Parliament to play in this role and for the judiciary to play in the individual cases of detention. "I believe that is an appropriate use of judicial oversight and review and Parliamentary decision making".
1310: Ms Smith says the Bill is now clearer about the trigger for any use of the new powers. In She says people have plotted to devastate the transport system, to use a dirty bomb, blow up a shopping centre and to cause multiple atrocities - she says that is the order of threat that "this is aimed to deal with". She says it is a higher test than originally proposed and similar to that in the Civil Contingencies Act.
1308: Labour MP David Winnick says the Director of Public Prosecutions made the point that if someone was held up to 24 or 25 days without a charge of at least reasonable suspicion - it would make a prosecution difficult. He says he is not convinced there is any justification for the plan.
1304: Labour backbencher Bob Marshall Andrews questions the description of an "exceptional threat" - asking for an example of what is not a "grave and exceptional terrorist threat". Ms Smith replies that he should have been more careful in reading the list of descriptions contained within the Bill.
1300: Dominic Grieve says the PM has "inadvertently" mislead the House over claims about what exactly MPs are being asked to approve, should the Home Secretary ask for an extension. Speaker Michael Martin says he must withdraw the remark, which he does.
1259: Conservative MP Eleanor Laing says the constitutional balance - the separation of powers between Parliament and the Judiciary is being jeopardised by the plan.
1258: The SNP's Angus MacNeil suggests the counter terrorism bill is more about keeping PM Gordon Brown in post, than keeping people in detention.
1257: Ms Smith says she and her minister Tony McNulty have been working on proposals for the best part of a year - and denies proposing a permanent, automatic or immediate detention beyond 28 days. She says the bill contains a reserve power only to be used in exceptional circumstances - with strong safeguards and for a temporary period.
1253: Tory MP Bill Cash says that a judge should decide whether or not someone should be detained. Ms Smith says a detainee will need to be brought before the court after 48 hours' detention - and then for every seven days after that. She says the principle of habeas corpus is enshrined in the principles of what the government is putting forward.
1252: Asked why she does not just use the civil contingencies act, and if she is afraid of safeguards contained in it, Ms Smith replies that the act would not contain any of the individual safeguards contained in the 42-days proposal, with respect to a judge reviewing the detention.
1250: Ms Smith says the risk is real and it is the responsibility of MPs "as lawmakers" to address that risk.
1249: Shadow attorney general Dominic Grieve asks why the government has been unable to persuade the Director of Public Prosecutions (DPP) of the need to extend the limit.
1247: Asked about former Metropolitan Police chief Lord Stevens' comments in support of the 42-day plan, Ms Smith says police may need longer to get to the bottom of a case and bring evidence, in circumstances where they have had to move early to intervene before a plot is carried out.
1246: Ms Smith said she had been clear that there had to be an upper limit so no-one could be detained indefinitely. She says the 42-day figure was arrived at with police.
1246: Plaid Cymru's Elfyn Lywyd asks why Ms Smith told the BBC a few weeks ago she had no idea how many days would be required.
1244: Opening the debate Home Secretary Jacqui Smith says it is possible to safeguard civil liberties and rights and to protect people. She tells MPs the threat is more complex and international than ever before as terrorists use technology to cover their tracks.
1240: So here we go. After months, if not years of debate outside Parliament, this is the session which will decide whether or not MPs will back the plan to extend the amount of time terror suspects can be held without charge from 28 days. We'll be following all the key points of the debate and, of course, the key vote which is expected at 1800 BST. You can follow the action on this page, on the BBC's site for mobile phones, and get the key points via our Twitter site.
Add your comments using the form below.
The BBC may edit your comments and not all emails will be published. Your comments may be published on any BBC media worldwide.