After more than 60 hours of heated debate, France's National Assembly has adopted a controversial immigration bill that speeds up the asylum process and steps up deportations, all aimed at controlling illegal immigration.

The new legislation, approved by 228 votes in favor to 139 against, was adopted on first reading late on Sunday and is on its way to the Senate for debate.

One of the key changes is that failed asylum seekers awaiting deportation can be held for up to 90 days, double the existing period of 45 days, but less than the 135-day period the government had initially aimed for, according to Le Parisien.

The deadlines for filing asylum applications or appealing against a rejection have also been altered. Asylum seekers will now have 90 days to file an application (down from 120 days) and a fortnight to appeal a rejection.

The new legislation came under fire, as being too tough, by human rights activists and opposition members.

Amnesty International France has issued a statement warning that the "dangerous" legislation jeopardized migrants' rights. “No migrant, especially a child, should be detained. These people did not commit any crime,” the watchdog wrote, adding that the traumatic effects of detention have been proven time and again, even more so in regards to children.

The French migrant-support charity Cimade also lambasted the draft law.

"So men, women and children can be locked up for three months without committing an offence. No government has ever gone so far on locking up foreigners," it tweeted.

According to the French Office for the Protection of Refugees and Stateless Persons (OFPRA), France received a “record” 100,000 asylum applications in 2017. Director Pascal Brice said the figures proved that “France is one of the top countries for seeking asylum in Europe.”