Conservatives will stage a referendum on whether Britain should remain a member of the European Union by the end of 2017 if they win the next election, David Cameron is to promise tomorrow.

The British Prime Minister will for the first time declare himself in favour of an in/out referendum, but will say it should not happen until the future shape of the 27-nation bloc is clear.

He will make clear that he will campaign for continued membership of a "more flexible, adaptable and open" EU.

In a major speech in London, Mr Cameron will say that the Conservative manifesto for the 2015 general election will ask for a mandate to negotiate a "new settlement" for Britain in Europe.

Enabling legislation would be drafted before the election and passed by the end of 2015 to complete the renegotiation and then submit it to voters in a referendum within the first half of the next five-year Parliament.

"It is time for the British people to have their say," Mr Cameron will say.

"It is time to settle this European question in British politics...

"I say to the British people: this will be your decision. And when that choice comes, you will have an important choice to make about our country's destiny."

Mr Cameron had initially planned to make his speech in the Netherlands last Friday, but had to postpone it in order to focus on the Algerian hostage crisis.

More than six months in the planning, the address has been so often delayed that the Mr Cameron joked he was taking a "tantric" approach to policy.

His speech comes amid growing Tory backbench concern about the rising tide of support the UK Independence Party, which has recorded poll ratings of 10% or more with its call for an immediate in/out poll.

Mr Cameron will acknowledge that "public disillusionment with the EU is at an all-time high" and will describe democratic consent for the EU within the UK as "wafer-thin".

But he will argue that a vote now between the European status quo and departure would be "an entirely false choice", as the EU is set to be "transformed perhaps beyond recognition" over the coming years by the measures needed to save the single currency.

"We need to allow some time for that to happen - and help to shape the future of the European Union, so that when the choice comes it will be a real one," he will say.

Mr Cameron will set out what he terms "a positive vision for the future of the European Union, a future in which Britain wants - and should want - to play a committed and active part".

The five key principles underpinning the future EU should be competitiveness, flexibility, power flowing back to member states, democratic fairness and accountability, he will say.

And he will warn that, if these issues are not addressed, "the danger is that Europe will fail and the British people will drift towards the exit".

"I do not want that to happen," Mr Cameron will say. "I want the European Union to be a success. And I want a relationship between Britain and the EU that keeps us in it."

Mr Cameron will reject claims that he will be unable to persuade other EU member states to agree reforms to suit Britain.

"With courage and conviction I believe we can deliver a more flexible, adaptable and open European Union in which the interests and ambitions of all its members can be met," he will say.

"With courage and conviction I believe we can achieve a new settlement in which Britain can be comfortable and all our countries can thrive.

"I believe something very deeply. That Britain's national interest is best served in a flexible, adaptable and open European Union. And that such a European Union is best with Britain in it.

"Over the coming weeks, months and years, I will not rest until this debate is won. For the future of my country. For the success of the European Union.

"And for the prosperity of our peoples for generations to come."

Labour leader Ed Miliband said the speech defined Mr Cameron as "a weak Prime Minister, being driven by his party, not by the national economic interest".

Mr Miliband said: "Everyone knows that the priority for Britain is the jobs and growth that we need.

"We have had warning after warning from British business about the dangers of creating years of uncertainty for Britain.

"This speech will do nothing for a young person looking for work, for a small business worried about a loan, for the family whose living standards are squeezed.

"Britain needs a Prime Minister who is making change happen now in Europe, ensuring that we put jobs and growth ahead of austerity and unemployment."

But Mr Cameron will reject the argument that placing a question mark over Britain's EU membership creates damaging uncertainty for business.

"The question mark is already there and ignoring it won't make it go away," he will say.

"In fact, quite the reverse. Those who refuse to contemplate consulting the British people would, in my view, make more likely our eventual exit.

"Simply asking the British people to carry on accepting a European settlement over which they have had little choice is a path to ensuring that when the question is finally put - and at some stage it will have to be - it is much more likely that the British people will reject the EU.

"That is why I am in favour of a referendum. I believe in confronting this issue - shaping it, leading the debate not simply hoping a difficult situation will go away."