DUP First Minister Arlene Foster is to remain in the role after a motion of “no confidence” against her was lost in the Assembly on Monday afternoon.

A total of 75 of the 108 MLAs voted, with a majority, 39, voting to exclude Ms Foster as First Minister for six months following her handling of the renewable heat incentive scheme, which has become known as the “cash for ash” controversy.

However, the motion nonetheless failed because it required a majority of both unionist and nationalist MLAs to support the motion.

The DUP, which has 38 Assembly members, had sufficient numbers of ensure the dual unionist-nationalist majority support condition could not be met.

Sinn Fein, which has 28 MLAs, abstained from the vote.

The Northern Assembly was gripped on Monday by anger, confusion and procedural wrangling as Ms Foster sought to explain how and why the catastrophic renewable heat incentive scheme happened.

Opposition parties walked out of the Assembly chamber as Ms Foster began her defence of her handling of the scheme, which could cost the Northern taxpayer more than £400 million (€440 million).

The controversial green energy scheme - set up by Ms Foster - paid out subsidies well in excess of the costs of buying renewable fuel.

The scheme was botched because, unlike in Britain, where caps were set, it was a case of “the more you burned the more you earned” - for every £1 spend on the scheme by non-domestic users they got £1.60 back.

This means subsidies must be paid out over the next 20 years well in excess of the costs of buying renewable fuel such as wood pellets.

The breakdown in the relationship between Ms Foster and Deputy First Minister Martin McGuinness due to the fallout from the scheme was illustrated earlier on Monday, when Mr McGuinness said she had no authority to make her statement.

As his and Ms Foster’s office is a joint one, he said her statement did not have his approval.

“She is speaking in a personal capacity and not in her role as First Minister,” he said.

Mr McGuinness again called for Ms Foster to stand aside pending an independent investigation of the green renewable scheme.

“The First Minister should stand aside to allow the investigation to take place in as conducive an atmosphere as possible,” he said.

“We also need to see urgent measures that will limit the damage of the scheme to the public purse,” he added.

“This is not about party politics. It is not an orange or green issue. It is about restoring the credibility of the power-sharing institutions and weeding out corruption and abuse.”

‘I will be staying here’

In the Assembly on Monday, Ms Foster flatly rejected his demand.

“I am here, I will be staying here,” she said, adding that she was determined that “this mess” will be cleared up.

Mr McGuinness had already warned of “grave consequences” if Ms Foster does not stand down.

Sinn Féin representatives would not explain what these consequences would be, but it could involve Mr McGuinness resigning as Deputy First Minister in order to force an Assembly vote to re-elect a First Minister and Deputy First Minister.

In such circumstances, Assembly elections are required to follow.

Speaking in the Assembly, Opposition members such as Ulster Unionist Party leader Mike Nesbitt, the SDLP’s Alex Attwood and Traditional Unionist Voice leader Jim Allister insisted that, under Stormont rules, Ms Foster should not be allowed to make her Ministerial statement, as she did not have the authority of the Deputy First Minister Mr McGuinness.

However, the DUP speaker Robin Newton insisted he followed proper advice in allowing Ms Foster to speak.

He also offered Mr McGuinness the facility to make a statement, which Mr McGuinness declined.

Former Sinn Féin minister Carál Ní Chuilín also warned that permitting the First Minister to speak would be a breach of rules.

Independent socialist Eamonn McCann said it was time to call Assembly elections. “We are in la-la land, please can we have an election.”

Mr Allister said it was apparent the joint office of Ms Foster and Mr McGuinness was “breaking apart” and he would “shed no tears” when that happened.

In the end, Mr Newton allowed Ms Foster make her statement, at which point all non-DUP MLAs present in the chamber walked out.

It was the second walkout of the day by members opposed to Ms Foster making her statement.

In her statement, Ms Foster acknowledged flaws in the overgenerous scheme, which was introduced in 2012 when she was Minister for Enterprise, Trade and Investment.

She said the failure to impose control measures was the “deepest political regret of my time in this house”.

She agreed there should be an inquiry into the scheme, but again rejected allegations by DUP MLA Jonathan Bell that she and some of her advisers were culpable for the fiasco.

Mr Bell made a brief statement to reporters in the great hall of Parliament Buildings saying there is an email that supports his version of the renewable heat incentive scandal.

He did not, however, provide detail of the email.