Gordon Brown and his ministers are rejecting claims they "bought" victory in a Commons vote on terror detention.
Labour rebels, Tories and Lib Dems looked set to defeat the plan - but it got through by 315 to 306 votes after nine Democratic Unionist MPs backed it.
Opponents claim Mr Brown swayed the DUP with extra cash for Northern Ireland - but the government insist they voted on national security grounds.
The Counter-Terrorism Bill faces a tough time in the House of Lords, where Labour does not have a majority.
The Tories and Lib Dems have vowed to continue opposing it and they are likely to be joined by a number of cross benchers and prominent Labour peers - setting up the prospect of Parliamentary "ping pong" towards the end of the year as it shuttles between the two houses.
Former Attorney General Lord Goldsmith said he would vote against the measure in the Lords, where he predicted it would suffer a "very rough ride".
And he accused his one-time cabinet colleague Mr Brown of putting politics before principle, saying his "fear" was that the 42 day issue had "become a symbol of political virility and I think it's too important for that".
There was uproar in the Commons when the result of the key vote was announced on Wednesday evening with Tory and Lib Dem MPs shouting "you've been bought" at the DUP benches.
They claimed the DUP had been offered inducements - including extra financial help for Northern Ireland - to guarantee its support.
Labour rebels said the DUP had obtained guarantees that the government would block efforts to use the Human Embryology and Fertility Bill, currently going through Parliament, to loosen abortion rules in Northern Ireland.