A bill to tackle illegal immigration has cleared its first parliamentary hurdle, despite opposition from Labour, Lib Dem and SNP MPs.

MPs voted to give the Immigration Bill a second reading by a margin of 49, after Labour's bid to block it was rejected by 40 votes.

It proposes a new offence of illegal working and requires landlords to carry out checks on prospective tenants.

The plans now face detailed committee-stage scrutiny from MPs.

Home Secretary Theresa May said the measures embodied in the bill would mean "greater fairness to British citizens and legitimate migrants".

Its objective, she told MPs, was to protect those who "play by the rules".

But her Labour counterpart, Andy Burnham, branded the bill "unpleasant and insidious".

The shadow home secretary said it was "driven by a desire to generate headlines" and would do nothing to bring the government closer to its target of reducing net migration from more than 300,000 currently to the tens of thousands.

The debate came after Mrs May was criticised by business groups and political opponents for an uncompromising speech to Conservative Party conference in which she pledged to crack down on immigration, warning that high migration made a "cohesive society" impossible.

What the Immigration Bill says

Under the Immigration Bill, people who work illegally in England and Wales would face up to six months in prison, and the police would be given the power to seize wages as the "proceeds of crime".

A Right to Rent scheme will require landlords to carry out checks on prospective tenants, such as seeing their passport or visa, to ascertain their immigration status.

Failing to do so would be a criminal offence leading to a fine or a jail sentence.

It would also become an offence for businesses and recruitment agencies to hire abroad without first advertising in the UK - a policy which featured prominently in Labour's election manifesto.

And it would introduce a duty on public authorities to ensure that public sector workers in public-facing roles can speak fluent English.

Theresa May's case for the bill

Opening the debate, Mrs May told MPs that the capacity to work illegally was one of the "pull factors" encouraging people to come to the UK, where they often ended up working in "depressing and dangerous conditions" and being exploited by organised criminal gangs.

Illegal working was affecting "reputable businesses", she added, by depressing pay and conditions in different industries and parts of the country.

She also defended plans to require landlords to check the immigration status of their tenants, saying they were not "expected to become immigration experts" but would be able to call a new helpline where they would be given a "very simple message" about what to do.

The legislation was welcomed on the Conservative benches with Damian Collins, the MP for Folkestone and Hythe, telling MPs that it was right to give enforcement agencies more powers and "those who have most to fear from the bill are the exploiters".

Opposition parties' positions

Image caption Labour has set out a "reasoned amendment" detailing the changes it wants to the bill

Labour supports certain aspects of the bill - including greater sanctions against employers of illegal immigrants and the English-speaking requirement - but opposes other measures, including new requirements on private landlords which Mr Burnham claimed would make the UK a "more hostile and unwelcoming country".

"Landlords are not border or immigration experts," he told MPs. "They are not trained in reading official paperwork...They are not experts in spotting forged documents. On what basis are we planning to outsource immigration control to them?"

He insisted that immigration had had a net positive impact on the British economy but there needed to be "rules that make immigration work for everyone" - including a new "rapid migration fund" - paid for out of EU structural funds - to ensure poorer areas of the country with disproportionately high levels of immigration had the ability to provide extra school places and GP appointments.

He also questioned why the government should be given "sweeping powers" to deport migrants and asylum seekers before they had the chance to appeal, saying it would prevent people "exercising their legitimate rights".

For the SNP, spokesman Stuart McDonald described the bill as "regressive, illiberal, ill-considered and inhumane" and said the party would be voting against it at second reading.

And Lib Dem spokesman Alistair Carmichael said there had been seven immigration bills in the last eight years and 45,000 changes to the immigration rules since Mrs May became home secretary in 2010, but decision making by border agencies did not seem to have improved.

"This immigration bill is not fit for purpose," he said. "With the refugee crisis showing no sign of slowing down, not one of the bill's 56 clauses looks at finding a solution or easing the pressure on Europe's borders."

Next stages

The bill was given a second reading by 323 votes to 274, majority 49, meaning it can progress to the next stage. But there is still a long way to go before it becomes law.

There will be the committee stage in the Commons, where MPs undertake detailed scrutiny of the plans. The bill will then return to the Commons for MPs to consider any changes, Once that is completed the bill then goes to the House of Lords, where parts of it may face considerable opposition.