Image caption A public inquiry will publish its report into the Renewable Heat Incentive (RHI) on Friday

Before it happened, the scenario would have sounded improbable - even absurd.

How did a green energy scheme involving chicken sheds, biomass boilers and wood pellets become a huge financial scandal, which played a major role in bringing down a government?

On Friday, a public inquiry will publish its report into the Renewable Heat Incentive (RHI) - otherwise known as the "cash-for-ash" scheme.

It was set up by Stormont in 2012, and aimed to encourage businesses to switch from fossil fuels to more environmentally-friendly energy sources.

It was similar to a scheme running in the rest of the UK - with a critical difference.

A flaw in the design meant that in effect, the money paid out was greater than the cost of fuel.

Also, there was initially no cap on payments.

All that contributed to a massive projected overspend - at one stage estimated at £700m over 20 years.

Stormont's Department of Enterprise, Trade and Investment was in charge of the scheme. It was run by ministers from the Democratic Unionist Party.

The RHI controversy triggered the final row in the always uneasy power-sharing coalition made up of the DUP and Sinn Féin - which collapsed in January 2017.

The devolved government returned three years later - with the Alliance Party, the Ulster Unionist Party and the SDLP also joining the ministerial executive.

Image copyright RHI Inquiry Image caption The RHI Inquiry raised questions about about the system of government in Northern Ireland

The public inquiry showed that the RHI debacle went further than party politics.

It raised questions about the entire system of government - including the role of the civil service, the use of external consultants in formulating policy and the relationship between ministers and their special advisors (Spads).

One of the key witnesses in the inquiry was Janette O'Hagan - who runs an energy efficiency firm, Heatboss.

She raised concerns with Stormont about the tariff arrangements for RHI in the early years of the scheme - but they were not acted upon.

Ms O'Hagan has spoken to the BBC Radio Four programme "The Cash-for-Ash Scandal" in her first interview since she gave evidence to the inquiry.

"I would never have dreamed, when I was sending off those emails in frustration, that it would have come to all this," she said.

'Better protection for citizens'

She told me that although "it hasn't been an easy time", her course of action was the right thing to do.

"I'm glad we're not wasting energy needlessly any more.

Image caption A biomass boiler, similar to those owned by some RHI scheme claimants

"I'd like to see better protections for citizens like me who raised legitimate concerns - to make sure they're not treated as political pawns."

She hopes the inquiry report will draw a line under the saga.

"Now it's time for a change of focus - we really need to focus on the environment, getting a good energy policy in place. It's a great opportunity to do so," she added.

Before the Stormont Assembly closed its doors for more than 1,000 days, it passed measures to cut the bill for RHI.

But it was subsequent changes in 2017 and 2019 by civil servants that really had an impact.

The retrospective cost controls mean that the scheme is currently underspending, rather than running hugely over budget.

But the debacle still left Stormont with a £30m bill.

Many RHI claimants say this put them on a crumbling financial cliff-edge.

Such is the concern they have about ruined reputations, it is rare for people who entered into the project to speak publicly.

'Show the truth'

We interviewed a chicken farmer who wanted to stay anonymous because, as he put it, RHI is still thought of as a "dirty scheme" taken up by people who were "on the make".

He pointed out that, like numerous others, he signed up for RHI in good faith - believing it would help the environment - and built it into his business plan for two decades.

He now has a gap which is impossible to plug - and that has caused immense worry.

"I haven't had a good night's sleep in three years," he said.

He said he hoped the inquiry report would simply "show the truth".

"The Department made serious errors when the scheme was set up," he said.

"The participants shouldn't be held responsible for it - I think we've been made the scapegoats."

The inquiry held public hearings for more than a year and gathered more than a million documents in its search for evidence.

Its findings will touch a range of areas - politics, officialdom and business for a start.

Sir Patrick Coghlin's report will be a highly significant moment for Northern Ireland - potentially the most comprehensive analysis yet of how devolution works.

No-one involved is expecting it to be a comfortable read.

• You can listen to The Cash-For-Ash Scandal, produced by Yamal Productions, on BBC Radio Four at 20:00 GMT on Monday 9 March, 11:00 GMT on Tuesday 10 March, and afterwards on BBC Sounds.