The EU aims to standardise rules for handling illegal migrants
Euro MPs have backed tough new rules aimed at preventing employers from hiring illegal workers, but a final vote will be held later this month.
Employers who break the rules could be forced to pay fines, make up wage shortfalls, or face a ban for up to five years from public contracts.
The "sanctions directive" already has the backing of the European Commission and EU member states' governments.
The UK is opting out, doubting the EU's authority to impose criminal sanctions.
Up to eight million non-EU illegal migrants are thought to work in the EU. Figures provided by 21 member states suggest a total of 893,000 to 923,000 illegal immigrants entering the EU each year.
The new rules, steered through the European Parliament by Italian Socialist MEP Claudio Fava, are set to take effect in 2011.
Mr Fava, quoted on the parliament's website, said "migrants are often subjected to terrible exploitation, sometimes even treated as slaves".
Illegal workers in the EU are often employed as builders, farm labourers, cleaners and hotel staff.
Criminal law penalties are envisaged for employers guilty of repeat offences. It will be up to individual EU states to decide whether that means a fine or prison term.
A contracting employer will also be held liable if a subcontractor uses illegal workers.
The directive is part of a broader EU package aimed at combating illegal immigration while encouraging legal migration.
A lobby group for firms in the EU, BusinessEurope, voiced objections to some parts of the legislation.
"We have strong concerns because the proposal is disproportionate: it puts a heavy administrative burden on companies and includes too severe penalties," said BusinessEurope's Marcus Schwenke.
He also complained about employers' liability for the actions of subcontractors, saying "companies are in practice not in the position to control the compliance of their subcontractors".
Catelene Passchier of the European Trade Union Confederation voiced concern that the legislation could drive "a lot of the illegal work further underground".