A senior Stormont adviser who formerly worked with Democratic Unionist leader Arlene Foster has quit amid allegations of exerting influence around a botched green energy scheme.

DUP special adviser Andrew Crawford's resignation was announced minutes after a public inquiry was instigated into the Renewable Heat Incentive scheme.

The RHI scandal, which has left Stormont facing a £490 million bill, was the trigger for the collapse of the power-sharing executive in Belfast.

Dr Crawford stood down 24 hours after he was named by a senior civil servant as the DUP adviser he believed was pressing to delay RHI cost controls.

The development came on another dramatic day in the Northern Ireland political world, with Sinn Féin veteran Martin McGuinness announcing his decision to quit front-line politics to focus on his health.

Dr Crawford said his resignation was an "appropriate" response to the allegations against him, claiming he did not want to be a "distraction".

But he insisted the public inquiry would prove he "acted with complete integrity".

"I am conscious I have become the focus of the story," he said.

He added: "I will be happy to give a full account of all of my actions during this period to the inquiry and for due process to take its course."

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, so 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.

Dr Crawford's brother is a poultry farmer who is a recipient of payments under the RHI scheme. There is no suggestion his brother is using the scheme inappropriately.

The long-serving DUP adviser, from Beragh in Co Tyrone, has always denied wrongdoing.

At an explosive hearing of the Assembly's Public Accounts Committee yesterday, permanent secretary at the Department for the Economy (DE), Dr Andrew McCormick, said he believed, through hearsay, that influence was being exerted by Dr Crawford on the DUP adviser within DE to keep the scheme running at a high tariff level.

Dr Crawford was at the time working for Mrs Foster, then finance minister. He had previously worked in the economy department with Mrs Foster during the period she first developed the RHI.

At the same PAC hearing, Dr McCormick said he had seen no evidence that Mrs Foster acted inappropriately in relation to the RHI.

Dr Crawford, who recently was working for DUP agriculture minister Michelle McIlveen, is the second DUP party special adviser to face scrutiny this week.

Yesterday current DE adviser John Robinson stood aside from any duties relating to RHI a day after it was revealed that his father-in-law was a poultry farmer who ran two RHI boilers.

Mr Robinson said he wanted to avoid a perception of conflict of interest.

Mrs Foster said she accepted his resignation with regret, describing him as a "faithful servant" to the party and the people of Northern Ireland.

"Anyone who knows Andrew Crawford knows he's a very private person and he didn't want to become the story," she said.

Sinn Féin finance minister Mairtin O Muilleoir ordered the public inquiry into the RHI. He said there was a need to "get to the truth".

"This inquiry will be impartial and objective," he said.

Last week, Ms Foster called for a public inquiry. She had written to Sinn Féin this week in relation to the establishment of a probe.

In recent weeks Sinn Féin had insisted a public inquiry would have been too time consuming.

Ms Foster said: "We wanted to say we very much welcome the change of heart from Sinn Féin in setting up this public inquiry. It is something I have been wanting for some considerable time."

She added: "As I have always said and indeed as was confirmed yesterday in (the public accounts) committee I have absolutely nothing to hide so I look forward to the inquiry reporting."

Brokenshire and Flanagan hold meeting

Northern Secretary James Brokenshire and Minister for Foreign Affairs Charlie Flanagan met at Stormont House this evening to discuss the ongoing political crisis that has prompted a snap Assembly election on 2 March.

During discussions, the politicians affirmed a commitment to finding a way forward. They also welcomed the RHI inquiry announcement as well as talking about issues related to Brexit.

Mr Brokenshire said it was important to build confidence in the ability of the institutions to deliver and help set the tone for the election to come by establishing an RHI public inquiry.

"I would encourage full co-operation with the inquiry, and hope that it is able quickly and effectively to establish the facts, and provide assurances to the public.

"For our part, the government will do everything we can to support this independent inquiry."