David Cameron has suffered a Commons defeat at the hands of Tory eurosceptic rebels after last-ditch efforts to dampen anger over the rules for the in/out referendum failed.

In the first such reverse since the election of a Conservative-only administration in May, the Government was defeated by 27 votes after Labour joined attacks on plans to water down restrictions on state-funded campaigning.

Ministers had earlier conceded ground to rebels and agreed to ensure any changes to "purdah" rules would be in place at least four months before polling day.

But the concession was not enough to prevent the collapse of Mr Cameron's slender majority in the report stage vote on the European Union Referendum Bill by 312 votes to 285.

A Labour amendment imposing a tougher version of "purdah" - which bans the use of public money to promote one side in the final 28 days of a referendum campaign - was passed without a vote.

Shadow foreign secretary Hilary Benn said the Government had tried to play "fast and loose" with the arrangements for the national vote on whether the UK should remain a member of the EU, which is due by the end of 2017.

"This is a humiliating defeat for David Cameron, with members from all sides of the House supporting Labour's approach to purdah, which ensures fairness in the conduct of the referendum campaign while permitting normal government business to take place," Mr Benn said.

"The Government should never have rushed through its flawed plans to play fast and loose with the rules on the referendum."

Mr Cameron had already staged a series of climbdowns over the EU Referendum Bill in the face of eurosceptic opposition, including agreeing to restore purdah restrictions, subject to certain exemptions to allow ministers to carry on "business as usual" in relation to the EU during the campaign.

In June, 27 Conservative MPs voted against the Government on a similar amendment - although on that occasion ministers avoided defeat as Labour abstained.

Leading rebel Bernard Jenkin said critics of the Government's stance had clearly "won the argument" and could look forward to a "fairer referendum".

He criticised ministers for apparently accepting the principle that "purdah" should apply but "still trying to dilute it" but blamed poor advice from civil servants for the impasse.

"I do not think the Government's integrity is in doubt," he told the Press Association after the vote.

"The Government has concerns but those concerns are groundless. It is absolutely plain that there is nothing wrong with the existing Political Parties, Elections and Referendums Act as it exists."

Press Association analysis of the division lists showed Mr Jenkin was one of 37 Conservative MPs who voted against the Government, including the chairman of the influential backbench 1922 Committee Graham Brady, former cabinet ministers Liam Fox, Cheryl Gillan, David Jones, Owen Paterson and John Redwood, as well as two MPs elected for the first time in May: Craig Mackinlay and Tom Pursglove.

Robert Oxley, campaign director of Business for Britain, said: "Tonight's vote is an important step to ensure that the EU referendum will be seen as fair and legitimate.

"We're glad MPs from across the political spectrum cooperated in the public interest to keep rules against taxpayer-funded government campaigning in the referendum rule book.

"We hope this is the start of much more cross-party cooperation to end the supremacy of EU law over UK law. We are pleased with tonight's vote but there is still more to do as the Bill continues to make its way through parliament."