David Cameron has promised an in/out referendum on the UK's membership of the European Union by the end of 2017 if the Conservatives win the next general election.

In a major speech in London, Mr Cameron said that the Conservative manifesto for the 2015 general election will ask for a mandate to negotiate a "new settlement" for Britain in Europe, which will be put to voters in a referendum within the first half of the five-year Parliament.

But the Prime Minister said he will campaign "with all my heart and soul" for Britain to stay in the European Union when the referendum comes. And he warned voters that if the UK did decide to leave, it would be "a one-way ticket, not a return".

Speaking to a business audience in the City of London, Mr Cameron called for a new EU treaty to reshape the 27-nation bloc, resolve the problems of the eurozone, allow the transfer of powers back from Brussels to national governments and make Europe's economy more competitive and its institutions more flexible and democratically accountable.

Mr Cameron said it was his "strong preference" to enact these changes for the whole EU, not just Britain alone. But if other member states are unwilling to go ahead with a new treaty, Mr Cameron said he was ready to renegotiate the UK's position to achieve a settlement "in which Britain can be more comfortable and all our countries can thrive".

Standing in front of a backdrop with the slogan "Britain and Europe", Mr Cameron said: "The next Conservative manifesto in 2015 will ask for a mandate from the British people for a Conservative government to negotiate a new settlement with our European partners in the next Parliament.

"It will be a relationship with the single market at its heart. And 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 EU on these new terms or come out altogether. It will be an in/out referendum. Legislation will be drafted before the next election. And if a Conservative Government is elected we will introduce the enabling legislation immediately and pass it by the end of that year.

"And we will complete this negotiation and hold this referendum within the first half of the next Parliament. It is time for the British people to have their say. It is time to settle this European question in British politics."

Wednesday's speech, which has been six months in the planning and was postponed from last week because of the Algerian hostage crisis, comes amid growing Tory backbench concern about the rising tide of support for the UK Independence Party (Ukip), which has recorded poll ratings of 10% or more with its call for an immediate in/out poll.

Mr Cameron acknowledged that public support for the EU is "thin" in the UK, where concern over the lack of democratic accountability is "particularly acute". But he argued 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.