Security lapses that allowed around half-a-million people into the UK without proper checks went far further than ministers realised, a hard-hitting new report has revealed.

The UK Border Agency (UKBA) is to be split in two after Theresa May, the Home Secretary, announced that full security was suspended on hundreds of occasions over the last four years.

Glasgow and Edinburgh were named among 10 airports and ports which allowed thousands of people into the country last year after officials turned off a facility that reads the biometric chips in passports.

The equipment was deactivated on a total of 14,812 occasions across the UK, including at Heathrow, Gatwick and also Calais in France.

The investigation by John Vine, the independent chief inspector of the UKBA, said the risk posed to national security was impossible to quantify.

The fiasco is the latest to engulf a Home Office once famously described as not "fit for purpose" by former home secretary John Reid.

Publishing the report yesterday, Home Secretary Theresa May announced a major shake-up in how the UK borders are policed.

However, Labour accused her of attempting to shirk responsibility and said the problems had been exacerbated by the Coalition Government's spending cuts.

There was an outcry last year when it was revealed that full checks at airports and ports had been regularly suspended, reportedly to prevent large queues building up. At the time, ministers admitted it was impossible to tell how many terrorism suspects had wrongly been allowed into the UK.

Mrs May claimed the then head of the UKBA, Glasgow-born Brodie Clark, had relaxed the checks without her permission.

He resigned, denying he was at fault and insisting he had not "gone rogue".

The report warned that there was a "lack of clarity" in communications between ministers and the agency, and revealed that the relaxation of checks went far further than those which came to light last year.

Checks against a so-called "warnings index" which shows if someone is wanted by police, including for terrorism offences, were suspended more than 350 times, it found.

No European passport holders travelling from some ski resorts or from the Disneyland Paris theme park were checked against the index for more than four years.

And fingerprint checks on foreign nationals who need visas to enter the UK were suspended more than 450 times.

The report also uncovered Operation Savant, operating without ministerial approval at Heathrow, which allowed students from "low-risk" countries into the UK even when they did not have the necessary clearance.

Such a scheme is potentially illegal, the report warns, and it has been shut down.

Many of the relaxations took place at Heathrow and Gatwick, but also at Glasgow and Edinburgh.

Mr Vine found overall checks had been suspended on far more occasions than either ministers or senior officials at the UKBA realised.

He added there was a "tremendous way to go" before the public could have confidence in security at the country's borders.

And he warned that this summer's London Olympics would prove a "significant test".

His report did find that Immigration Minister Damian Green initially approved suspension of the fingerprint checks.

However, Mr Green said this agreement had been only "in principle" and that he had expected Mr Clark to come back with more detail in due course. When he did so in April, the proposals were rejected by the Home Secretary.

Mrs May said a new structure was needed at the Border Force, which polices the UK's border and will now be led by Wiltshire Chief Constable Brian Moore.

It is to be removed from UKBA control and taken into the Home Office.

Mrs May told MPs: "The Vine Report is clear that the risk to the border needs to be kept in perspective.

"No one was waved through. Everyone had their passports checked, and warnings index checks were almost always carried out so that those who had previously come to the attention of the authorities would still be identified and refused entry."

Labour's Shadow Home Secretary, Yvette Cooper, said the suspension of border checks had "escalated" under the Conservatives.

Mrs May denied her claim that cuts had made the problems at the UKBA worse. The Coalition said the half-a-million figure had to be seen in the context of around 100 million travellers to the UK every year.

Mr Clark's union, the FDA, said it was clear the blame was shared between ministers and their officials, adding that it was pressing ahead with his claim for constructive dismissal.