Tory leader David Cameron has accused Prime Minister Tony Blair of being "rattled" over immigration, foreign prisoners and human rights laws.
In fierce Commons exchanges, Mr Cameron also repeated his claim these issues showed the government's "paralysis".
The PM acknowledged there was "far more" to do but said Mr Cameron had opposed many key security measures.
Ministers are under fire after an immigration chief said he did not know how many illegal immigrants there were.
Mr Blair confirmed there were no official estimates of the number of illegal immigrants, but asylum applications were down and the numbers of failed asylum seekers being deported had increased since 1999.
The introduction of "electronic borders" planned for 2007 and the planned identity card scheme would help control immigration, he added.
Mr Blair insisted the government had not shifted its position on ensuring the "vast bulk" of foreign prisoners are deported automatically.
Mr Cameron said the foreign prisoner debacle - taken together with immigration and the government's failure to reform human rights legislation - showed it was in "paralysis".
"After four home secretaries, 43 pieces of legislation in nine years, should anyone believe he is the right man to sort it out?", asked Mr Cameron.
Keith Best, chief executive of the Immigration Advisory Service, said the problems had been caused by the end of embarkation controls, in 1994 for people leaving the UK for the EU, and in 1998 for the rest of the world.
This meant the government no longer knew the identity of people leaving or entering the country - something ID cards and "e-borders" are meant to rectify.
Sir Andrew Green, of pressure group Migration Watch, said: "This debacle underlines the fact that the government have effectively lost control of UK's borders.
"The Home Office has deliberately increased immigration with the result that it has been overwhelmed by numbers. That is fundamentally the reason why we keep getting one incident after another."
The row erupted after the UK's head of immigration removals David Roberts told MPs on Tuesday he did not "have the faintest idea" of the numbers.
Mr Roberts told the Commons home affairs committee there was little point trying to hunt people who overstayed their visas and resources had been targeted instead on firms employing illegal workers.
He also said he did not know how many people had been ordered by the Home Office to leave the country - a situation described as "amazing" and "a mockery of the immigration control system" by Labour MP David Winnick.
Shadow home secretary David Davis said the government had not told the "whole truth" and ministers actually knew how many illegal immigrants there were.
He said the figure according to official estimates released last year was "higher than 500,000" but he said ministers had been instructed "not to talk about it".
But the "real disgrace", Mr Davis argued, was not the figures but the fact that the home office did not know where individual illegal immigrants were and that it was no longer looking for them.
Liberal Democrat home affairs spokesman Nick Clegg said Mr Roberts' "breathtaking admission" confirmed "what many people have suspected for some time: the government's management of our immigration system is completely incompetent".