British Prime Minister David Cameron has suffered a defeat at the hands of Tory eurosceptic rebels in parliament, over planned rules for the UK's referendum on EU membership.

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," he added.

Mr Cameron had already staged a series of climb downs 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.