A chaotic Conservative leadership race must not distract from Brexit threats or derail efforts to restore Stormont, Sinn Fein’s leader has warned.

Reacting to Theresa May’s announced departure, Mary Lou McDonald was scathing of her time in office.

She said the outgoing prime minister had set unrealisable red lines on Brexit and had entered a confidence and supply deal with the DUP that had damaged the political process in Northern Ireland.

“The chaos at Westminster cannot be allowed to distract from the very real threat that Brexit poses to Ireland,” Mrs McDonald said.

“They also should not derail progress in the North talks.”

The Sinn Fein president was commenting in Dublin as she cast her vote in Ireland’s European and local council elections.

“Irrespective of who leads, it is paramount that people’s rights and agreements are protected,” she said.

“Following the British general election, Theresa May prioritised a deal with the DUP at Westminster over re-establishing the powersharing institutions.

“This Tory/DUP deal has had a negative influence on the political process.

“Theresa May set unrealisable red lines in the Brexit negotiations and only eventually accepted the need for a backstop as the bare minimum to avoid a hard border.

“The people want and need a resolution to the impasse in the North to the issues which led to the collapse of the 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.”

SDLP leader Colum Eastwood said the resignation should send a “very clear message” to Britain and Europe that Brexit is a “fundamentally undeliverable prospect”.

“Attempts to implement Brexit have now cost the British Government 38 ministers since the 2016 referendum, including two prime ministers,” he said.

“It is a doctrine that seeks to sink an axe of simplicity into the delicate layers of political relationships across Ireland and it has broken old political certainties in Britain. It is fundamentally an undeliverable prospect.

“I have disagreed with Theresa May almost every single step of the way over the course of the last three years.

“Triggering Article 50 with no plan to prevent a hard border in Ireland, reneging politically on the agreed terms of the backstop, and stubbornly refusing to call a halt to the madness that has consumed Westminster.

“It is undeniable, however, that she has exhausted every avenue to find agreement in the House of Commons.

“The simple fact remains, however, that there is clearly no consensus to be found.

“The European Union has already said very clearly that the Withdrawal Agreement is not up for renegotiation.

“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.”

Alliance Party deputy leader Stephen Farry said the next prime minister would face the same issues and must be prepared to act with “realism and honesty”.

“While Theresa May conducted herself in a dignified and courteous manner, it doesn’t change the fact she has left the UK in a worse place than when she took up the role,” he said.

“While she attempted several times to get her Withdrawal Agreement through Parliament, she had her hands tied through mutually contradictory red lines over Brexit.

“Mrs May also had the chance to build a consensus around a softer version of Brexit with a special deal for Northern Ireland, but failed to do so.

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

“Given the time needed to conduct the process to select a new Conservative leader and prime minister, it is likely another extension to Article 50 will be required, if we are to not leave the EU with no deal.

“The next prime minister must push for a People’s Vote and allow people to Remain, now they know the mess Brexit will bring.”

Ulster Unionist leader Robin Swann said the Prime Minister’s successor should have an absolute commitment to the maintenance of the Union and the prosperity of all its people.

“The country is deeply divided and the Prime Minister’s successor will have to seek to heal those divisions whilst delivering a Brexit which maintains the economic and constitutional integrity of the United Kingdom.

“The new prime minister should have all four corners of our nation at the forefront of their thinking when they are making defining decisions about the future direction of the United Kingdom.”