By Peter Griffiths
LONDON (Reuters) - British Prime Minister David Cameron suffered a humiliating defeat in parliament on Wednesday after Conservatives rebelled over Europe, an issue that has divided his party for decades and helped bring down previous leaders.
Although the result carried no legal weight, the setback raised questions about Cameron's authority after months of missteps by his coalition government and it revived painful memories of Conservative infighting over Europe.
Cameron wants the European Union's long-term budget to rise only in line with inflation, while opponents said it should be cut in real terms to reflect the bleak economic landscape at home and across Europe.
The rebels won the vote by 307 to 294 votes, a majority of 13, after they received support from the Labour Party, a generally pro-European group accused by Cameron of "rank opportunism".
"This is a time for Brussels to listen to the British people and do what we are all doing, and that is cutting our cloth," Conservative lawmaker Mark Pritchard, one of the revolt's leaders, told Sky News.
Rebels said the vote - Cameron's first significant defeat in parliament since taking power in 2010 - could strengthen his position at budget talks in Brussels next month because he will be able to say his hands are tied by the British parliament.
Other Conservatives said it would weaken his position.
Many Britons regard the EU as an incompetent and spendthrift bureaucracy. Britain's ties with the 27-member bloc are likely to be a big theme in a national election due in 2015.
Cameron wants Britain to remain an EU member but to renegotiate its role within the bloc, focusing more on trade links and less on areas like regulation.
Addressing parliament before the vote, Cameron said he was prepared to use his veto to block an EU budget deal if he thought it was bad for Britain. France also threatened on Wednesday to use its veto if the proposals imply farm spending cuts.
"This government is taking the toughest line in these budget negotiations of any government since we joined the European Union," Cameron said before the vote.
"At best we would like it cut, at worst frozen, and I'm quite prepared to use the veto if we don't get a deal that's good for Britain."
Accused of siding with the rebels to score cheap points against Cameron, Labour said it was right to ask Europe to cut its budget in real terms at a time of economic hardship.
"This is a humiliating defeat for David Cameron which shows how weak and out of touch he has become," said Labour finance spokesman Ed Balls.
In a bad-tempered clash in parliament, Labour leader Ed Miliband compared Cameron to John Major, the former Conservative prime minister whose time in office in the 1990s was dogged by infighting over Europe.
Bitter arguments over Britain's role in Europe were central to the downfall of another former leader, Margaret Thatcher.
Trailing in popularity polls, Cameron faces an uncomfortable balancing act on Europe. He does not want to alienate a majority of voters - and a powerful Conservative minority - who might vote to leave the EU after nearly 40 years.
The Conservative leader must also see off a threat from the fiercely anti-EU UK Independence Party, which polls suggest has around 10 percent of the vote, about the same as the pro-Europe Liberal Democrats, the junior coalition partner.
However, Cameron must also keep the Lib Dems on side and avoid wrecking relations with the EU, Britain's biggest trading partner, as the country emerges from recession.
(Additional reporting by Mohammed Abbas; Editing by Guy Faulconbridge and Mark Heinrich)