br>By Andrew Osborn and Peter Griffiths
LONDON, Jan 23 (Reuters) - Prime Minister David Cameron promised on Wednesday to give Britons a referendum choice on whether to stay in the European Union or leave if he wins an election in 2015, placing a question mark over Britain's membership for years.
Cameron ended months of speculation by announcing in a speech the plan for a vote sometime between 2015 and the end of 2017, shrugging off warnings that this could imperil Britain's economic prospects and alienate its biggest trading partner.
He said the island nation, which joined the EU's precursor European Economic Community 40 years ago, did not want to retreat from the world, but public disillusionment with the EU was at "an all-time high".
"It is time for the British people to have their say. It is time for us to settle this question about Britain and Europe," Cameron said. His Conservative party will campaign for the 2015 election promising to renegotiate Britain's EU membership.
"When we have negotiated that new settlement, we will give the British people a referendum with a very simple in or out choice to stay in the European Union on these new terms; or come out altogether. It will be an in-out referendum."
The speech firmly ties Cameron to an issue that was the bane of a generation of Conservative leaders. In the past, he has avoided partisan fights over Europe, the undoing of the last two Conservative prime ministers, John Major and Margaret Thatcher.
Britain would seek to claw back powers from Brussels, he said, a proposal that will be difficult to sell to other European countries. London will do an "audit" to determine which powers Brussels has that should be delegated to member states.
Sterling fell to its lowest in nearly five months against the dollar on Wednesday as Cameron was speaking.
The response from EU partners was predictably frosty. French Foreign Minister Laurent Fabius quipped: "If Britain wants to leave Europe we will roll out the red carpet for you," echoing Cameron himself, who once used the same words to invite rich Frenchmen alienated by high taxes to move to Britain.
German Foreign Minister Guido Westerwelle said his country wanted Britain to remain a full EU member, but London could not expect to pick and choose the aspects of membership it liked.
Business leaders have warned that the prospect of years of doubt over Britain's EU membership would damage the investment climate.
"Having a referendum creates more uncertainty and we don't need that," Martin Sorrell, chief executive of advertising giant WPP, told the World Economic Forum in Davos.
"This is a political decision. This is not an economic decision. This isn't good news. You added another reason why people will postpone investment decisions."
The speech also opens a rift with Cameron's junior coalition partners, the Liberal Democrats. Their leader, Deputy Prime Minister Nick Clegg, said the plan would undermine a fragile economic recovery.
And even allies further afield are wary: the United States has said it wants Britain to remain inside the EU with "a strong voice".
Cameron has been pushed into taking such a strong position in part by the rise of the UK Independence Party, which favours complete withdrawal from the EU and has climbed to third in opinion polls, mainly at the expense of the Conservatives.
"All he's trying to do is to kick the can down the road and to try and get UKIP off his back," said UKIP leader Nigel Farage.
Eurosceptics in Cameron's party were thrilled by the speech. Conservative lawmaker Peter Bone called it "a terrific victory" that would unify 98 percent of the party. "He's the first prime minister to say he wants to bring back powers from Brussels," Bone told Reuters. "It's pretty powerful stuff".
Whether Cameron will ever hold the referendum remains as uncertain as the Conservatives' chances of winning the next election in 2015.
They trail the opposition Labour party in opinion polls, and the coalition government is grappling with a stagnating economy as it pushes through public spending cuts to reduce Britain's large budget deficit.
Cameron said he would prefer Britain, the world's sixth biggest economy, to remain inside the 27-nation EU. As long as he secured the reforms he wants, he would campaign for Britain to stay inside the EU "with all my heart and soul".
But he also made clear he believed the EU must be radically reformed. It was riskier to maintain the status quo than to change, he said.
"The biggest danger to the European Union comes not from those who advocate change, but from those who denounce new thinking as heresy," he said.
"WAFER THIN" CONSENT
The euro zone debt crisis was forcing the bloc to change, and Britain would fight to make sure new rules were fair to countries that didn't use the common currency, he said. Britain is the largest of the 10 EU members that do not use the euro.
Democratic consent for the EU in Britain was now "wafer thin", he said, reflecting the results of opinion polls that show a slim majority would vote to leave the bloc.
"Some people say that to point this out is irresponsible, creates uncertainty for business and puts a question mark over Britain's place in the European Union," said Cameron. "But the question mark is already there: ignoring it won't make it go away."
Asked after the speech whether other EU countries would agree to renegotiate Britain's membership, Cameron said he was an optimist and that there was "every chance of success."
"I want to be the prime minister who confronts and gets the right answer for Britain on these kind of issues," he said.
It is nearly 40 years since British voters last had a say in a referendum on Britain's membership of the European club. A 1975 vote saw just over 67 percent opt to stay inside with nearly 33 percent wanting to leave.