The upper house of the French parliament has passed a tough new immigration bill, weeks after it was adopted by the lower chamber.
Nicolas Sarkozy said France needed immigrants who brought new skills
The bill makes it harder for unskilled migrants to settle in France and abolishes the rights of illegal immigrants to remain after 10 years.
Interior Minister Nicolas Sarkozy, who drafted the bill, says it will bring France into line with other countries.
Critics say it is racist and accuse Mr Sarkozy of pandering to the far-right.
Mr Sarkozy, who is seen as a potential contender in presidential elections next year, says France must be in control of immigration, rather than a passive recipient.
The proposed law also requires immigrants from outside the European Union to sign a contract agreeing to learn French and to respect the principles of the French Republic, and makes it more difficult for them to bring their families over to join them.
PROPOSED NEW RULES
Only the qualified get "skills and talents" residency permit
Foreigners only allowed in to work, not live off benefits
Foreign spouses to wait longer for residence cards
Migrants must agree to learn French
Migrants must sign 'contract' respecting French way of life
Scraps law on workers getting citizenship after 10 years
Mr Sarkozy has argued that riots by youths in immigrant suburbs across France last November showed the system of immigration and integration was failing.
He says France, like a number of other Western countries, needs to choose the immigrants it needs.
Most immigrants living in France come from its former African colonies.
The proposed law has been criticised by many in the region, including President Abdoulaye Wade of Senegal.