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.

Read more: In full - Theresa May's Brexit speech

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.

Read more: In full - Theresa May's Brexit speech

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."

Read more: In full - Theresa May's Brexit speech

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.