A little-known rule, introduced by Labour in 2003, allows illegal immigrants to claim "indefinite leave to remain" if they manage to live in Britain's black economy for long enough or are failed asylum seekers who manage to avoid deportation.
After 14 years they can apply to the Home Office which considers factors such as "compassionate circumstances, strength of connection to the UK and previous criminal record", before deciding whether an illegal immigrant will be allowed to stay.
Immigrants to be taught how to queue
Illegal immigrants alleged to be working at Alan Johnson’s 'canteen’
Immigration: a plan to alter the nation's soul
Illegal immigrants handed compensation for wrongful detention
Vicar arrested over 180 sham weddings
Michael Jackson's will nominated mother, Diana Ross as guardians
If successful, the immigrant will then be allowed full access to the welfare state and be eligible to apply for a British passport.
Since rules changed in April 2003, 7,245 illegals have won the right to live here permanently – more than 1,000 a year on average. It is likely that many paid no income tax during the 14 years they spent in Britain.
The Home Office estimated in 2005 that the illegal immigrant population in Britain was between 310,000 and 570,000 but other groups such as Migrationwatch UK, which campaigns against mass immigration, have put the figure far higher.
Migrationwatch UK now believes the true number of illegal immigrants could be as high as one million.
Damian Green, the shadow immigration minister, said: "What disturbs me most is how many more people will be able to establish this type of squatters' rights to stay in this country.
"Rewarding illegal behaviour is always bad, and there ought to be a lot more effort put into stopping people getting to this 14 year level.
"One of the reasons why we want to set up a specialist border police force is to prevent people being able to stay here for many years entirely below the radar."
Sir Andrew Green, the chairman of Migrationwatch, said: "It is wrong in principle that people who have been undercutting British workers for many years and often paying no tax should be granted full access to our welfare state.
"This is a reward for crime, provided you get away with it for long enough."
One immigration law adviser, who declined to be named, said: "I'm surprised this rule still survives, to be honest.
"It is an anomaly when compared with the rest of the Government's policy which purports to be getting tough with immigrants who have irregular status."
The rules allowing illegal immigrants to claim residence after 14 years were formalised by the Home Office in 2003 but previously existed as a loose concession.
The arrangements mirror the legal status of "squatters' rights", formally known as adverse possession, in English and Welsh law.
These rules say that anyone who has occupied land or property for 12 years can apply to be registered as owner.
A Home Office spokesman said: "Not all applications for indefinite leave to remain through the long residence rule will be granted.
"They are considered on a case-by-case basis, taking into account the strength of connection to the UK, previous criminal record and compassionate circumstances, and so on."
He added that it was expected that the number of people granted indefinite leave to remain under the rule would fall as asylum claims were dealt with more quickly.
Keith Best, an immigration expert and former chairman of the Immigration Advisory Service, said: “This is a sensible and flexible system.
"It takes account of individual circumstances, particularly when somebody may have been an overstayer in this country and has not always committed a deliberate act of trying to evade the authorities.”
The 14 years which illegal immigrants have to wait before claiming indefinite leave to remain in Britain is only four years longer than the period of time required of lawful immigrants.
Those who stay here on a visa or who are granted refugee status only have to wait 10 years before applying for the same concession, if they have been continuously resident in Britain.