Minister for Foreign Affairs Charlie Flanagan has said he regrets "the circumstances"  that led to the decision of Martin McGuinness to resign as Northern Ireland Deputy First Minister.

In a statement, he said the Renewable Heat Incentive controversy "is very much a matter for the devolved Executive and Assembly."

However, he said that "the Government is very mindful of the need to protect the integrity of the principles and institutions of the Good Friday Agreement.

"In this regard, both the effective functioning of those institutions and respecting the principles of partnership and equality are of critical importance.

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

Mr Flanagan went on to say that the Irish Government will "continue to work with the British Government and the political parties to advance political stability, reconciliation and economic prosperity in Northern Ireland."

Outgoing Stormont First Minister Arlene Foster branded Mr McGuinness's decision to resign and pull down the power-sharing administration as "not principled" and "purely political".

Ms Foster added: "Let me make it clear the DUP will always defend unionism and stand up for what is best for Northern Ireland and it appears from the Deputy First Minister's resignation letter that is what annoys Sinn Fein the most."

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

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

Mr Brokenshire acknowledged the likelihood of Assembly elections, saying in a statement: "There is a clear process set out regarding what happens next.

"Unless Sinn Féin nominates a replacement to the position of deputy First Minister within the next seven days, it is incumbent upon me to call an Assembly election within a reasonable period."

Fianna Fáil Leader Micheál Martin said in statement: “The stage is now being set for a bitter election campaign that will not address any of the issues that led us to this point, and the future of the institutions is thrown into serious doubt.

"Our fear is that party political interests have now overtaken the public interest.”

He continued: "At a time when people in the North need their representatives to step up to the plate, put differences aside and fight together in the common interest to meet a once in a generation threat, they have been very badly let down by the ruling parties of DUP and Sinn Féin.

SDLP Leader Colum Eastwood said: "The public understand that there is one reason for this potential election - Arlene Foster's arrogance."

He added: "For years Sinn Féin have been addicted to appeasement and are only now waking up to the reality that the DUP have been running rings around them in government."

Ulster Unionist leader Mike Nesbitt said a public inquiry should be held into the failed RHI scheme so all the facts are exposed and cost controls are put in place.

He accused Sinn Fein of prioritising self-interest. "This is Sinn Fein letting the DUP off the hook," he said. "The public mood clearly indicates they want the facts of the RHI debacle exposed.

"To move straight to an election without this taking place is farcical.

"They had a choice between the integrity of the institutions and electoral advantage and they appear to have chosen the latter."

Sinn Féin President Gerry Adams defended Mr McGuinness's decision, saying: "Today, once again Martin McGuinness has taken decisive action to bring the RHI scandal, and the DUP's attitude to the political process, to a head." 

Later in a statement, Mr |Adams said: "Martin McGuinness has led from the front in the Executive for the last ten years, defending the integrity of the political institutions and realising the potential of the Good Friday Agreement.

"He has worked with successive DUP leaders and is recognised throughout the north, across Ireland, and across the world for his leadership and peacemaking.

"In spite of the provocation, disrespect, and arrogance from the DUP and the failures of the British government to fulfil its responsibilities over that time, Martin McGuinness has always put the people and the political process first."

Alliance leader Naomi Long said the DUP has "recklessly endangered" the political institutions.

She said the public clearly want the First Minister to step aside without prejudice for the duration of an inquiry into the RHI scandal, but her "inability to swallow her pride" and her "belligerent attitude" has placed her party on a collision course with Sinn Féin, which with the resignation of Mr McGuinness has now raised the stakes and potentially set the course for an election.