Prime Minister Tony Blair has made a final appeal to MPs to back plans to allow police to hold terror suspects without charge for up to 90 days.
Mr Blair has refused to back down on the 90-day detention plans
Voting has begun and is expected to be so close that ministers Gordon Brown and Jack Straw were called back early from foreign trips to back the plan.
The Conservatives, Liberal Democrats and some Labour MPs oppose the plans.
Mr Blair said two terror plots had been foiled since the 7 July attacks and said MPs had a "duty" to back the plan.
In heated exchanges at prime minister's questions, Mr Blair said police had to be able to arrest people earlier because terrorists wanted to inflict mass casualties.
"We are not living in a police state but we are living in a country that faces a real and serious threat of terrorism," he said.
Conservative leader Michael Howard challenged him to provide an example of a case where it might have taken 90 days to get the evidence to charge a suspect.
Mr Howard also warned the detention plans could alienate ethnic minority communities.
His shadow home secretary, David Davis, said he did not doubt Mr Blair thought the new powers were needed.
But he had also been convinced that Saddam Hussein had weapons of mass destruction - and that had proved to be wrong, said Mr Davis.
Liberal Democrat leader Charles Kennedy said the measure would almost certainly be defeated in the House of Lords, where two ex-law lords had called it "intolerable".
The prime minister admits the vote will be "very, very tight" but told the Commons it was an issue of leadership not just for him but for other party leaders and all MPs.
He said: "Sometimes it is better to lose and do the right thing than to win and do the wrong thing."
If the government loses, after a three-hour debate on the detention plans in the report stage of the Terrorism Bill, it would be Mr Blair's first Commons defeat in government.
It would be a blow to his authority but would not mean he would have to stand down as prime minister - something he has said he will do before the next election.
In a sign of how tight the vote is likely to be, Chancellor Gordon Brown was called back to the UK within minutes of arriving in Israel for a high profile visit.
Gordon Brown was called home by the chief whip
He denied the need for his return showed Mr Blair's authority was faltering, saying people felt strongly about the plans.
Foreign Secretary Jack Straw also flew back early from EU-Russia talks in Moscow.
Labour rebel Jeremy Corbyn said the government was in "enormous panic". Another MP described the Westminster mood as "ferocious".
Home Secretary Charles Clarke last week avoided a vote - and possible defeat - on the 90-day proposal by promising further talks.
But ministers are now sticking by their original plan to extend the current 14 day limit to 90 days.
Mr Clarke denied ministers were playing "party politics" but he accused Tory leadership contenders Mr Davis and David Cameron of ducking their responsibilities.
He underlined the concessions he had made to meet MPs' concerns.
The detention process would be supervised by a High Court judge, he said.
And the new law will expire in a year's time unless MPs approve it again - something Mr Clarke said would allow MPs to see the measure in practice.
The Conservatives, Lib Dems and Labour rebels are backing a compromise time limit of 28 days.
If MPs reject the 90 day plan, a 60-day option will also be offered.