Net immigration increased last year, official figures show
Immigrants who commit "even minor crimes" or make no effort to integrate will face a longer wait to become a UK citizen, the government has announced.
The Home Office said the Borders, Immigration and Citizenship Bill would allow more "flexibility", speeding up qualifying in some other cases.
It promised the bill, unveiled in the Queen's Speech, would ensure a "firm but fair" system was in place.
The government also said border guards would be able to do customs checks.
The Home Office said the bill would "ensure migrants earn the right to stay by implementing the new path to citizenship, with progress slowed down if migrants don't make an effort to integrate, or commit even minor crimes.
"There will be a number of changes to nationality law, allowing us to shorten or lengthen the qualifying period according to behaviour."
The bill says the UK Border Agency will adopt a "fully integrated approach" to immigration, with guards getting powers to oversee customs checks.
If passed by Parliament, it would make the Border Agency look after the welfare of children involved in immigration.
The bill would also reduce the restrictions on people from overseas, but who have a British-born mother, applying to become a UK citizen.
It would end the "historic cut-off point" which means it only applies to those people born after 1961.
Liberty has raised concerns about a clause in the draft version of the bill which they say would mean state officials could stop anyone who has ever entered the country and demand they prove who they are - without evidence of any crime.
They say it would effectively cover anyone who has returned after a holiday.
Director Shami Chakrabarti warned the measures could lead to compulsory ID cards "through the back door" while the No2ID campaign said it was evidence of a "stalker state".
Liberal Democrat home affairs spokesman Chris Huhne added: "If this is included in legislation, it will be the worst example of creeping state power since the outrageous plan, thankfully jettisoned, to allow ministers to create criminal offences with a sentence of up to two years in prison without even a debate in Parliament."
A Home Office spokeswoman would not confirm if the clause in the draft legislation was included in the bill.
But she said: "It is simply wrong to claim there are any plans whatsoever to make identity cards compulsory for British citizens."
She said under the ID Cards Act, police would not be able to stop anyone - British or foreign - in the street and demand to see their card.
But, she added, to maintain "effective immigration control it is only right that we ask everyone attempting to enter to the UK to produce a valid identity document".
Net immigration to the UK increased to 237,000 in 2007, according to Office for National Statistics figures published last month.
That was 46,000 more than in 2006 and came as a result of emigration falling faster than immigration.
The figures mean that the population has grown by 1.8 million because of immigration since Labour came to power in 1997.