Theresa May has warned fellow EU nations that she is ready to walk away from Brexit talks rather than accept a "punitive" deal.

In a speech setting out her 12 key objectives for EU withdrawal, Mrs May announced that Britain will leave the European single market but will seek a "bold and ambitious" free trade agreement to allow it to continue trading with its 27 former partners.

Mrs May confirmed that she wants to take Britain out of the jurisdiction of the European Court of Justice and restore control over immigration.

And she gave her strongest hint yet that the UK could leave the European customs union (CU), stating that she wanted to ensure "frictionless" cross-border trade but had an "open mind" on whether that should be done through associate membership of the CU or a completely new customs agreement.

She announced that MPs and peers will be given a vote on the final deal reached with the EU in talks under Article 50 of the treaties, due to be triggered by the end of March.

But she did not make clear whether a vote against any agreement would mean the UK staying in the EU or crashing out without a deal.

Mrs May said she was "confident" that a deal and a new strategic partnership between the UK and the EU can be achieved within the two-year deadline set out in Article 50, insisting that a good deal for Britain will also be good for Europe.

But she warned: "I know there are some voices calling for a punitive deal that punishes Britain and discourages other countries from taking the same path. That would be an act of calamitous self-harm for the countries of Europe. And it would not be the act of a friend.

"Britain would not - indeed we could not - accept such an approach. And while I am confident that this scenario need never arise - while I am sure a positive agreement can be reached - I am equally clear that no deal for Britain is better than a bad deal for Britain."

Mrs May said that her plan would create "a truly global Britain ... a great, global trading nation that is respected around the world and strong, confident and united at home".

But Labour leader Jeremy Corbyn said she appeared to be warning that she was ready to turn the UK into a "low-corporate taxation, bargain basement economy off the shores of Europe" if the EU did not give her everything she wanted.

And Liberal Democrat leader Tim Farron said: "Theresa May has confirmed Britain is heading for a hard Brexit. She claimed people voted to Leave the single market. They didn't. She has made the choice to do massive damage to the British economy."

The markets reacted positively to the PM's speech, with the pound soaring more than 2% to over 1.23 US dollars, after slumping below 1.20 in the past few days as speculation grew that the UK would be leaving the single market.

Much of the boost appeared to come after Mrs May's announcement that MPs and peers will be given an opportunity to block the Brexit deal.

Addressing an audience including diplomats from around the world at Lancaster House, Mrs May said she expected "compromises" on both sides during the two-year Brexit negotiation.

But she said she was committed to 12 key objectives, including controlling immigration, free trade with European markets, the freedom to strike free trade agreements with nations outside the EU and a "smooth orderly Brexit".

She rejected calls for a "transitional deal" to tide Britain over until a full-scale trade agreement can be struck, warning this could end in a "permanent political purgatory".

But she said the deal should be implemented in a phased process to deliver a "smooth and orderly Brexit", which could see changes to immigration laws, customs systems and legal frameworks introduced at different times.

She called for "early" agreement on the rights of EU nationals in the UK and British expats in Europe.

And she said she hoped for continued co-operation on scientific research, law enforcement, counter-terrorism, the sharing of intelligence material and foreign and defence policy.

Other priorities included strengthening the United Kingdom, preserving workers' rights and maintaining free travel between Northern Ireland and the Republic.

Mrs May said quitting the single market would mean the UK no longer has to pay "huge sums" into EU budgets, though she left open the possibility of voluntary funding for specific projects.

"As a priority, we will pursue a bold and ambitious free trade agreement with the European Union," said Mrs May.

"This agreement should allow for the freest possible trade in goods and services between Britain and the EU's member states. It should give British companies the maximum freedom to trade with and operate within European markets - and let European businesses do the same in Britain.

"But I want to be clear. What I am proposing cannot mean membership of the single market ... (That) would to all intents and purposes mean not leaving the EU at all.

"So we do not seek membership of the single market. Instead we seek the greatest possible access to it through a new, comprehensive, bold and ambitious free trade agreement."

Mrs May rejected full membership of the customs union on current terms, as it would prevent the UK from striking its own trade deals with outside countries. But she said: "I do want us to have a customs agreement with the EU.

"Whether that means we must reach a completely new customs agreement, become an associate member of the customs union in some way, or remain a signatory to some elements of it, I hold no preconceived position. I have an open mind on how we do it."

On immigration, she said the UK would continue to attract "the brightest and best" to work and study in Britain and would "always welcome individual migrants as friends". But she insisted Brexit "must mean control of the number of people who come to Britain from Europe".

Former Ukip leader Nigel Farage said: "I can hardly believe that the PM is now using the phrases and words that I've been mocked for using for years. Real progress.

"My worry is how long this is going to take and when we will start doing a deal with the USA and others."

The PM is understood to be planning to speak personally about her plan with German chancellor Angela Merkel, French president Francois Hollande, European Council president Donald Tusk and European Commission president Jean-Claude Juncker in the coming days.

Mrs May spoke to Scottish First Minister Nicola Sturgeon and Welsh First Minister Carwyn Jones ahead of her speech this morning.

She also spoke to DUP leader Arlene Foster and Irish Taoiseach Enda Kenny on Monday although those talks mainly focused on the political crisis in Northern Ireland.

It is understood that Mrs May regards her speech as fulfilling her promise to provide details of her plan for Brexit and is not intending to produce a White Paper on the issue, as the cross-party House of Commons Exiting the EU Committee has demanded.

Mr Farron said that by offering Parliament a vote on the final deal, Mrs May was effectively accepting that Article 50 is reversible.

It would be an "outrage" if voters were denied the final say in a second referendum, he said.

MPs would have to have the option of voting to reject the deal and retain EU membership, said the Lib Dem leader.

Otherwise, Mrs May would be offering them the choice between "a bad deal or falling into outer darkness" with no deal, he said, adding: "No Prime Minister who gave a monkey's about the British people would leave only those two options."

Mr Farron said Mrs May's decision to "raise the white flag" rather than fight for membership of the single market on Britain's terms would be seen as a sign of "weakness" by European capitals.

He told businesses which want to retain single-market membership: "If you give a penny to the Tory Party now, you are funding your own funeral."

European Council president Donald Tusk said Mrs May's speech meant the EU had a "more realistic" view of Britain's hopes and said the remaining 27 states were "united and ready to negotiate".

In a message on Twitter, Mr Tusk said: "Sad process, surrealistic times but at least more realistic announcement on Brexit. EU27 united and ready to negotiate after Article 50."

Ukip leader Paul Nuttall said Mrs May's address "sounded like a Ukip conference speech".

But he added: "I am concerned that what we're getting is some sort of slow-motion Brexit where she is speaking about interim measures, or a transitional period, which will only begin after April 2019.

"She has given no end date to these transitional measures. I challenge the Prime Minister: let's have this all done and clean before the next general election in 2020."

Mrs May is expected to speak to Mr Juncker later today, the European Commission said.

Spokesman Margaritis Schinas said Mr Juncker had been briefed on the speech and was in regular contact with the Prime Minister.

"We will react to specific UK positions and requests only once the Article 50 process has been formally triggered," Mr Schinas said.

Downing Street said the vote in Parliament on the deal secured following exit negotiations would be binding.

The Prime Minister's official spokeswoman added: "We are now seeking a new partnership with the EU. Either way, we will very clearly be leaving the EU."