Up to 50,000 migrants may have exploited flaws in a new student visa system in its first year to come and work in the UK, a report by Whitehall's spending watchdog says.
Under a system introduced in 2009, each student must be sponsored by a licensed college and cannot change institution without gaining permission.
But "key controls" had not been put in place, the National Audit Office found.
The Home Office said "tough new rules" were cutting student visa numbers.
Under the previous system, there was no limit on the number of non-European Economic Area students a college could enrol and students were free to move college and course without notifying the UK Border Agency.
The replacement, brought in by the Labour government, states that each student must be sponsored by educational institutions licensed by the agency and cannot change college without applying to it.'Low priority'
Colleges are responsible for judging people's intentions to study.
But the audit office said the system had been brought in "before the key controls were in place" and that "in its first year of operation, between 40,000 and 50,000 individuals may have entered the UK... to work rather than to study."
It added: "The agency did not check that those who entered the UK as students were attending college."
The report continued: "The agency has taken little action to prevent and detect students overstaying or working in breach of their visa conditions because the agency regards them as low-priority compared to illegal immigrants and failed asylum seekers."
The agency has removed 2,700 students since 1 April 2009, but the audit office said it had "been slow to withdraw students' leave to remain in the UK, where it has cause to do so. This has meant that, in many cases, enforcement teams have been unable to arrest students found working and not attending college."
Addresses for almost a fifth of more than 800 migrants wanted by the agency were found in just one week at a cost of £3,000 by a contractor hired by the watchdog.
Amyas Morse, head of the audit office, said the flaws in the student visa system had been "both predictable and avoidable".
He added: "Action planned by the agency to ensure that those with no right to remain in the UK are identified and required to leave must now be pursued more vigorously."
Labour MP Margaret Hodge, who chairs the Commons Public Accounts Committee, said: "This is one of the most shocking reports of poor management leading to abuse that I have seen... The agency needs to get a grip and fix the way it deals with student visas."
But immigration minister Damian Green said: "This government has introduced radical reforms in order to stamp out abuse and restore order to the uncontrolled student visa system we inherited.
"These include tough new rules on English language, working rights and dependants to ensure only legitimate students come to the UK. New restrictions on post-study work mean that all but the very best will return home after study."
He added: "These measures are beginning to bite, we have already seen the number of student visas issued drop considerably in the second half of 2011, compared to the same period in 2010."
Universities UK chief executive Nicola Dandridge said "good progress" had been made tightening up the system.
She added: "Visa abuse in relation to UK universities is very low compared to other parts of the education sector and universities are committed to reducing it further."