More than 1,000 foreign prisoners who should have been considered for deportation at the end of their sentences were freed with no action being taken, Home Secretary Charles Clarke admitted today.
The offenders included three murderers and nine rapists, Home Office figures showed.
Mr Clarke apologised for the failure and conceded that some of the public would be angered by the oversight.
Mr Clarke said: "To the best of my knowledge between February 1999 and March 2006, 1,023 foreign national criminals who should have been considered for deportation or removal completed their prison sentences and were released without any consideration of deportation or removal action."
Among the total, five had been convicted of committing sex offences on children.
Seven had served time for other sex offences, 57 for violent offences and two for manslaughter.
There were also 41 burglars, 20 drug importers, 54 convicted of assault and 27 of indecent assault.
The Home Office admitted that it did not know the full details of the offences committed by more than 100 of the prisoners.
Asked if he believed all of the 1,023 prisoners would be recaptured for possible deportation, Mr Clarke said: "There are a large number of people involved. I can't say hand on heart that we will identify where each one of those is, but we are working on that very energetically."
So far, the Immigration and Nationality Directorate (IND) has tracked down 107 of the total, leading to 20 deportations.
The situation only came to light after the Commons all-party Public Accounts Committee asked questions about released foreign prisoners in a hearing last October.
Mr Clarke said: "We take it extremely, extremely seriously in every respect.
"The concern, possibly anger, that people will feel, I think, is entirely understandable.
"But I think it's better to acknowledge and admit it, and deal with it in that way."
The error took place because the Prison Service was not focused on the nationality of its prisoners while the IND was preoccupied with other matters, he explained. At the same time, the number of prisoners in England and Wales who were born overseas was increasing rapidly from 4,300 in 1996 to more than 10,000 at the end of February this year, he added.
"We simply didn't make the proper arrangements for identifying and considering removal in line with the growth of numbers that were there," said the Home Secretary.
"That is a failure of the Home Office and its agencies for which I take responsibility."
In 160 of the cases, the courts had made a recommendation that the criminals should be kicked out of Britain at the end of their sentences, it was revealed.
IND director general Lin Homer said of the 160 they had identified 14, of whom five had been deported and nine considered inappropriate for removal.
Mr Clarke insisted he did not want to apportion blame between different parts of the Home Office for the error.
"I'm not going down the blame game here," he said.
"Both the Prison Service and the IND failed to carry out their responsibilities in the way they ought to have done.
"They have both taken steps to lead me to be confident that it is now being done properly.
"It is a failure and it is not acceptable and that's what we're putting straight."
There was no data available on whether any of the 1,023 committed more crimes in Britain since they were released, the Home Secretary said.
Of the 1,023, 288 were released between last August and the end of last month, Mr Clarke said.
A Home Office breakdown showed 237 of the foreign criminals were failed asylum seekers and 54 were still having asylum applications considered.
Only 151 were serving a sentence of less than a year.
In all, 13 were serving sentences over 10 years, nine were serving sentences over nine years and seven were serving more than eight years.
Mr Clarke said: "We are working extremely hard and energetically to understand exactly what has happened to these 1,023 people.
"People who have committed serious offences should be deported to the country from which they come."
The Home Office confirmed that thousands of foreign national prisoners were deported in the last two years.
In a letter to PAC chairman Edward Leigh, Mr Clarke said: "During 2004 and 2005 we considered approximately 5,500 of foreign national prisoners on release and deported approximately 3,000."
Assistant general secretary of probation union Napo Harry Fletcher said the chances of tracking down large numbers of the released prisoners was "remote".
He said: "The best opportunity would be if they are re-arrested for other offences and checks are carried out on the Police National Computer.
"The chances of finding significant numbers is fairly remote."
He added: "The Home Office is facing crisis - the budget is frozen for the next three years.
"What this shows is the urgent need for investment in multi-agency liaison so that agencies can talk to each other."