KRUEN, Germany, June 8 (Reuters) - British Prime Minister David Cameron tripped up over Europe at a summit of the Group of Seven Industrial nations (G7), appearing to issue an ultimatum to his own ministers over the EU only to swiftly withdraw it, saying he had been misunderstood.

The debacle was Cameron’s first serious setback since he was re-elected a month ago and was all the more awkward because it concerned his flagship policy of renegotiating Britain’s EU ties before holding an in-out EU membership referendum.

His uncertain handling of such an important issue is likely to be interpreted as a sign of how nervous he is to keep his fractious Conservative Party united to avoid a re-run of past splits which helped topple his two immediate predecessors.

Britain’s EU relationship was not on the G7 agenda which was devoted to issues such as Greece, Ukraine and climate change.

Yet Cameron’s closing news conference was dominated by the subject with all seven questioners touching on it, forcing a visibly irritated Cameron to repeat himself.

Speaking on Sunday, Cameron had moved to head off the first signs of a Eurosceptic rebellion in his party by suggesting ministers would have to back his EU strategy, which envisions Britain remaining in a reformed EU, or leave his government.

“If you want to be part of the government, you have to take the view that we are engaged in an exercise of renegotiation to have a referendum, and that will lead to a successful outcome,” he told reporters.

“Everyone in government has signed up to the programme set out in the Conservative manifesto,” he said.

But on Monday, after senior Eurosceptic lawmakers lined up to criticise his stance, Cameron said he had been misunderstood, saying his warning to ministers had only applied to the EU renegotiation period not the referendum campaign itself.

“It’s clear to me that what I said was misinterpreted. I was clearly referring to the process of renegotiation,” said Cameron.

“I’ve always said what I want is an outcome for Britain that keeps us in a reformed EU, but I’ve also said we don’t know the outcome of these negotiations, which is why I’ve always said I rule nothing out. Therefore it would be wrong to answer hypothetical questions.”

He declined to say whether ministers would be allowed a “free vote” in the referendum campaign.

His apparent change of heart drew derision from his country’s press corps who accused him of flip-flopping on a vital issue and of confused policy-making.

“UNWISE STANCE”

Cameron originally spoke out after a group of over 50 of his own lawmakers said they were prepared to join a campaign backing a British EU exit, or “Brexit”, unless he achieved radical changes in the bloc.

Cameron, who has promised to hold the referendum by the end of 2017, says he is confident he can get a deal that will allow him to recommend Britons vote to stay in the EU, which they joined in 1973.

He has said he needs the EU to alter its founding treaties so that any changes he secures are safe from legal challenge.

But he is vulnerable on the home front, commanding a mere 12-seat majority in the 650-seat House of Commons and a rebellion over Europe could derail his wider agenda.

Speaking before Cameron’s office tried to clarify his comments, senior Conservative lawmaker David Davis said Cameron’s stance was “unwise”.

“There is a risk what we may end up doing is turning a decent debate into a bitter argument,” Davis told BBC Radio.

“This doesn’t show a great deal of confidence in the outcome of those negotiations, that he has to say now: my way or the high way, stay and obey the line or leave.”

Eurosceptic Conservatives already feel Cameron has framed the referendum question in way a that favours a vote to stay and are angry he has decided not to impose restrictions on government campaign activity in the run-up to the vote.

The Times reported campaign spending limits would be increased by 40 percent for the referendum, raising fears among those backing an exit that they will be outspent.

Some Eurosceptics have suggested they feel so strongly that they might try to amend a law going through parliament to enable the referendum to take place. The law is expected to be debated in parliament on Tuesday. (Additional reporting by William James and Kylie MacLellan in London; Editing by Guy Faulconbridge)