The French parliament has given strong backing to a controversial immigration bill that will make it more difficult for the unskilled to settle in France.
Many immigrants in French suburbs come from North Africa
The bill offers residence permits to highly qualified newcomers from outside the European Union.
Interior Minister Nicolas Sarkozy, who drafted the bill, says it will bring France into line with other countries but critics say it is racist.
Mr Sarkozy is on a visit to West Africa, where he is facing protests.
Ahead of his arrival in Mali - the homeland of many immigrants living in France - hundreds staged a march against the legislation in the capital, Bamako.
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.
Deputies in the National Assembly approved the bill by 367 votes to 164 on Wednesday.
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
It must also be passed by the Senate, which will start debating it next month.
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 do choose the immigrants it needs.
"It's selective immigration," he said.
Son of immigrants
During the debate the interior minister has faced criticism from the opposition centre and left.
Nicolas Sarkozy said France needed immigrants who brought new skills
Socialist MP Serge Blisko said the bill amounted to "the organised pillaging of brains", according to the Associated Press.
Wednesday's vote came as Mr Sarkozy flew to West Africa for a two-day trip designed to discuss immigration issues.
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.
Mr Sarkozy, who is the son of a Hungarian immigrant, has since praised the contribution of skilled migrants to France but insists those who entered illegally must be sent back.
The council of Christian Churches wrote to the government expressing its concern.
Marielou Jampolski, of the French anti-racism organisation SOS Racisme, said it was completely opposed to the bill.
"We think that it tries to kill every liberty and every right of the French immigrants, and I think it's very dangerous for the country."