Thousands of illegal immigrants have been queuing at ports and airports in Malaysia, hoping to leave the country before a massive deportation operation.
An amnesty allowing undocumented foreigners to depart without penalty expires at midnight (1600 GMT).
The government has warned that illicit foreign workers and their employers will be rounded up.
Those caught and found guilty of immigration offences risk being fined, whipped and imprisoned.
The BBC’s Jonathan Kent in Kuala Lumpur says the scenes are much the same at exit points around Malaysia—foreign workers leaving, carrying their children and the few possessions they have managed to accumulate.
The move has caused widespread concern among human rights groups.
Estimates have put the number of undocumented foreign workers in Malaysia at up to one and a half million.
Most of the illegal immigrants have come from neighbouring Indonesia, which has twice persuaded Malaysia to extend the expulsion deadline.
But although Indonesia’s resources are still stretched coping with the tsunami devastation in Aceh, Malaysia has signalled that it will wait no longer.
Our correspondent says thousands of police and civilian volunteers are on standby, waiting to carry out raids and arrest anyone who remains in Malaysia without the correct papers.
He says illegal immigrants are widely blamed for rising crime there, but human rights groups say that the participation of so many civilians in the round-ups, some of them carrying firearms, could easily lead to accidents and abuses.
The Malaysian government, however, says the deportations will be conducted humanely and it has promised to quickly process applications from those who have left before the deadline and want to return.