Powersharing in Northern Ireland has been plunged into crisis after Martin McGuinness resigned as Deputy First Minister in protest at the Democratic Unionist Party's handling of a botched renewable energy scheme.

The Sinn Fein veteran's move will lead to the collapse of the Stormont Executive and will force DUP First Minister Arlene Foster from office.

A snap Assembly election now looms.

Mr McGuinness announced his decision after his partner in government, Mrs Foster, repeatedly refused to step down to facilitate a probe into the ill-fated Renewable Heat Incentive (RHI) - a scheme that has left Stormont facing a £490 million overspend.

Analysis: Martin McGuinness, the peace process and a scandal of political ineptitude

Mr McGuinness said he was resigning with "deep regret and reluctance".

"We in Sinn Fein will not tolerate the arrogance of Arlene Foster and the DUP," he said

"I believe today is the right time to call a halt to the DUP's arrogance."

The Sinn Fein veteran is experiencing health problems but he insisted that had not influenced his decision.

"The First Minister has refused to stand aside, without prejudice, pending a preliminary report from an investigation," he said.

"That position is not credible or tenable."

Read more: Martin McGuinness to resign as Deputy First Minister of Northern Ireland over Renewable Heat Incentive scandal

He made clear that Sinn Fein would not replace him in the role. As a consequence, the collapse of the institutions and an election are now inevitable.

"We now need an election to allow the people to make their own judgment on these issues democratically, at the ballot box," he said.

Mrs Foster presided over the ill-fated RHI while economy minister.

She has steadfastly refused to accede to Sinn Fein's demand for her to step aside to facilitate an inquiry into her actions.

The state-funded RHI was supposed to offer a proportion of the cost businesses had to pay to run eco-friendly boilers, but the subsidy tariffs were set too high and, without a cap, it ended up paying out significantly more than the price of fuel.

This enabled applicants to "burn to earn" - getting free heat and making a profit as they did so.

Read more: Martin McGuinness to resign as Deputy First Minister of Northern Ireland over Renewable Heat Incentive scandal

Claims of widespread abuse include a farmer allegedly set to pocket around £1 million in the next two decades for heating an empty shed.

Mr McGuinness's move came hours after Mrs Foster accused him of playing a political game of chicken and warned she would not blink first.

"If he is playing a game of chicken, if Sinn Fein are playing a game of chicken, and they think we are going to blink in relation to me stepping aside they are wrong - I won't be stepping aside," she said.

"And if there is an election, there is an election."

While Sinn Fein had been due to formally call for Mrs Foster to step down in an Assembly debate next week, there had been speculation the party would pull the plug earlier.

Analysis: Martin McGuinness, the peace process and a scandal of political ineptitude

Mr McGuinness, who has been experiencing health problems, confirmed that on Monday afternoon.

"It is my firm view that the DUP's handling of this issue has been completely out of step with a public mood which is rightly outraged at the squandering of public money and the allegations of misconduct and corruption," he wrote in his resignation letter to the Assembly's speaker.

Read more: Martin McGuinness to resign as Deputy First Minister of Northern Ireland over Renewable Heat Incentive scandal

"The public are demanding robust action and accountability but the DUP, in particular its leader Arlene Foster, have refused to accept this."

The structure of Stormont's Executive Office means a First Minister cannot hold the position without a co-equal Deputy First Minister. Mr McGuinness's resignation means Mrs Foster will no longer be First Minister.

The Foyle Assembly member said: "My health is absolutely nothing to do with this whatsoever."

He said a decision on whether he would stand in the next election was an issue for "a later date".

Mr McGuinness cited other disputes with the DUP, including over the Irish language and stalled mechanisms to deal with the legacy of the Troubles, in explaining the move.

He said the DUP were living in a "Fool's Paradise" if they thought they would be able to return to government with Sinn Fein after an election if the RHI issue was not resolved.

Theresa May's official spokeswoman said: "The Prime Minister has been kept updated on the resignation of Martin McGuinness.

Read more: Martin McGuinness to resign as Deputy First Minister of Northern Ireland over Renewable Heat Incentive scandal

"The Northern Ireland Secretary James Brokenshire is in contact with people there, encouraging all parties to continue the dialogue."

Ireland's Foreign Minister Charlie Flanagan spoke by phone to Mr McGuinness and Mr Brokenshire.

He added: "If, as appears likely, new elections to the Assembly will now be required, it behoves all parties to act responsibly in word and deed, so that the political institutions of the agreement will not be damaged in the longer term."

Tory MP and former Northern Ireland secretary Theresa Villiers told BBC Radio Four's PM: "I don't think we should overstate the gravity of the problems at Stormont. Clearly they are very serious. An early election just six months after the last one is a set-back.

Analysis: Martin McGuinness, the peace process and a scandal of political ineptitude

"It does look to me as if an early election seems, more or less, inevitable, given the signals that Sinn Fein are sending out.

"The stability of Northern Ireland devolution settlement, I don't think is under threat as yet.

"If there was an election and Sinn Fein refused to nominate a deputy first minister, then there would be problems to be resolved."