British Prime Minister David Cameron suffered a setback on Thursday when a lawmaker from his ruling Conservative Party unexpectedly defected to the UK Independence Party, which wants Britain to leave the European Union.

The move, by Douglas Carswell, a Euroskeptic, comes eight months before a national election in which UKIP threatens Cameron's re-election chances. UKIP won May's European elections in Britain after taking votes from the Conservatives.

Carswell, 43, said he was standing down as a Conservative member of parliament with immediate effect because he had lost faith in Cameron's promises to try to renegotiate Britain's EU ties if he wins power again next year.

Cameron has said he would give Britons an in/out EU membership referendum in 2017 after the renegotiation, if it happens.

"David Cameron has made up his mind, he wants to stay in (the EU)," Carswell told a news conference.

"It's all about positioning for the election. If I believed they were sincere about real change I wouldn't be here, I don't believe that they're serious."

UKIP, which wants an immediate British EU withdrawal and an end to what it calls an "open door" immigration policy, has no seats in the British parliament, but 24 of the country's 73 seats in the European Parliament.

A Conservative spokesman said Carswell's defection was "regrettable," saying the Conservatives were the only party that could deliver an EU membership referendum.

The announcement threatens to unsettle the Euroskeptic wing of Cameron's party, estimated to account for around a third of his 304 members of Parliament ahead of next year's national election, and could prompt other defections.

Internal Conservative Party ructions over Europe contributed to the political undoing of the last two Conservative prime ministers, John Major and Margaret Thatcher.