National Insurance numbers were issued to 3,300 suspected illegal immigrants in 2004-5 because of a loophole in the application system, it has emerged.
Opposition parties say the loophole shows a "failure" in the system
The Department of Work and Pensions has admitted job centre staff must hand out the numbers to people who have found employment but have no legal papers.
It has pledged to close the loophole "as soon as possible".
Ministers say the numbers do not grant illegal workers access to the NHS and benefits as there are separate checks.
Work and pensions minister Jim Murphy refused to apologise when questioned on BBC Radio 4's PM programme.
He said the government would rather concentrate on changes which would "get it right and close the loophole".
'Labour did nothing'
The Conservatives' immigration spokesman, Damian Green, described the loophole as being "a policy failure".
He claimed ministers had failed to act on recommendations made in a report by Labour peer Lord Grabiner QC in 2000.
"This morning, one newspaper publishes a story on the front page saying this is a big problem," said Mr Green. "By lunchtime the government has said OK, we'll change the law.
"I think this is the absolute essence of New Labour, that they're much more concerned about the headline than about a serious report that they're prepared to ignore for six years".
Job centre interviews
Ministers insist they have acted on the Grabiner report and have brought in new checks such as face-to-face interviews.
When a person finds a job but has no legal papers, they are interviewed at a job centre to establish their identity.
Staff must issue numbers even if they suspect the applicant has no right to work. Each case is then investigated.
But the Home Office said it did not know how many of the 3,300 applications resulted in a prosecution.
Currently the applicant is free to use the NI number unless it is taken from them or they are deported.
The National Insurance system was introduced in Britain in 1948
"The National Insurance system was set up in 1948. Times have obviously changed since then," the Department of Work and Pensions said in a statement.
"Having reviewed this issue, ministers have decided to change the law as soon as possible, so that people who have no right to live or work in the country are not given a National Insurance number."
The CBI - which represents British business - claimed a change in the law was necessary because should not be the responsibility of companies to check whether NI numbers had been authorised properly.
"Employers face real difficulties in vetting potential employees because of the sophistication of scams by illegal immigrants seeking work," said the CBI's Anthony Thompson.
"The apparent ease with which National Insurance numbers can be obtained makes an already-complex situation even more complicated.
"Even the most rigorous of firms can unwittingly make a mistake, so any tightening of the rules which assists business will be welcome.
The Liberal Democrats called for an "urgent" explanation from the government on how it intended "to reform this failing system".