Image copyright European Photopress Agency Image caption Mrs May became emotional as she announced her intention to quit

Theresa May's resignation puts Brexit in a new phase that may be "very dangerous for Ireland", Taoiseach (Irish Prime Minister) Leo Varadkar has said.

Mr Varadkar said the PM's departure could lead to the election of a "Eurosceptic" prime minister.

Mrs May said she would quit as Conservative leader on 7 June, paving the way for a leadership contest.

The taoiseach said her successor may scrap the Brexit withdrawal agreement.

"We may see the election of a Eurosceptic prime minister who wants to repudiate the withdrawal agreement and go for no-deal, or we may even see a new British government that wants a closer relationship with the EU and goes for a second referendum," said Mr Varadkar.

But the taoiseach said that whatever happens, the Irish government will "hold its nerve".

"We are going to build and strengthen our alliances across the European Union and we will make sure that we see Ireland through this," he added.

Mr Varadkar said Mrs May was "principled, honourable, and deeply passionate about doing her best for her country".

"Politicians throughout the EU have admired her tenacity, her courage, and her determination during what has been a difficult and challenging time," he said.

Image caption Leo Varadkar's deputy Simon Coveney (right), warned the UK would not get a better Brexit deal than that negotiated with Theresa May

However, Tanáiste (Deputy Prime Minister) Simon Coveney warned the European Union would not offer Mrs May's successor a better Brexit deal.

"This idea that a new prime minister will be a tougher negotiator and will put it up to the EU and get a much better deal for Britain? That's not how the EU works," Mr Coveney told Ireland's Newstalk radio station.

He said a further Article 50 extension, delaying Brexit, was "possible and may be likely".

Political leaders from across the island have been giving their reaction to Mrs May's resignation announcement.

Here are some of them:

Image copyright PA

Northern Ireland Secretary

Karen Bradley said she was "deeply saddened to see the prime minister step down from the job she loved".

She said Mrs May was an "extremely courageous and dedicated public servant" who "always does what she believes is in the best interest" of the whole of the UK.

Mrs Bradley added that Mrs May "worked tirelessly to deliver Brexit that works for all parts of the UK" and "passionately believed in working with all parties and parts of the community in NI "to restore devolution and build a stronger, shared society for all".

Democratic Unionist Party

DUP leader Arlene Foster, whose 10 MPs prop up the Conservative government in Westminster, paid tribute to Mrs May's "selfless service in the interests of the United Kingdom".

She also thanked the prime minister for "her willingness to recognise Northern Ireland's need for additional resources through confidence-and-supply arrangements".

Image copyright PA

She told BBC Radio Ulster's Evening Extra programme Theresa May had discovered that "when you try to bounce the DUP it simply doesn't work".

Mrs Foster said Mrs May had fundamentally misjudged the DUP's position on Brexit throughout the negotiations.

The DUP leader said she hopes the next Conservative leader has "an understanding of what makes the DUP tick".

Sinn Féin

Sinn Féin leader Mary Lou McDonald said the "chaos at Westminster" cannot be allowed to distract from "the very real threat that Brexit poses to Ireland".

She also said the talks process should not be pushed off course.

Ms McDonald accused Mrs May of having prioritised a deal with the DUP at Westminster over re-establishing the power-sharing institutions.

"An agreement can be reached and a deal can be done. But the process must not be derailed nor responsibility abdicated in respect of people's rights and agreements."

Social Democratic and Labour Party

SDLP leader Colum Eastwood said the prime minister's resignation showed that Brexit was "fundamentally undeliverable".

"A new prime minister should recognise the mistakes made by Theresa May, revoke Article 50 and put an end to this political, diplomatic and economic car crash," he said.

Alliance Party

Alliance deputy leader Stephen Farry said that while Mrs May had been a dignified prime minister, she had "left the UK in a worse place than when she took up the role".

"While she attempted several times to get her withdrawal agreement through Parliament, she had her hands tied through mutually contradictory red lines over Brexit," he said.

He said Mrs May had also squandered a chance to build a consensus around a softer version of Brexit with a special deal for Northern Ireland.

"No matter who now replaces her, the same problems will still persist . They will face stark choices regarding Brexit and its consequences, and they need to approach them with honesty and realism."

Ulster Unionist Party

Ulster Unionist Party leader Robin Swann said Mrs May's successor "should have an absolute commitment to the maintenance of the union and the prosperity of all its people".

Mr Swann said "the bind" in which the prime minister's government found itself "was of its own making".

"A change of Conservative Party leader will not necessarily solve the problem unless there is a change in approach.

"The backstop is the problem that needs dealt with and it ultimately broke Theresa May's premiership," he added.