Mr Fyfe alleges that there were poor levels of oversight and control. He says when he reviewed cases where subsidies had been awarded, he would find 50% or sometimes 60% did not comply with the Ofgem guidelines, and some involved serious abuse.

He says his bosses did not always respond well when he told them what he had found.

Mr Fyfe felt there were pressures within Ofgem senior management because there was seen to be "a risk of the management of those schemes being taken away from Ofgem and contracted out to a private company".

He argues that controversial business models arose between 2014 and 2017 where some companies would require homeowners to sign leases on their property as part of an agreement to supply the boiler. The subsidy money then went to the company.

Mr Fyfe said that at the time, the Ofgem legal team said those so-called "third-party models" were not allowed.

However, he said: "There was a huge drive to get as many applications through as possible. There simply were not checks getting done. They were processed willy-nilly".

He paints a picture of confusion within Ofgem over what should or should not have been approved.

Ofgem told the BBC: "We have a system of processes and checks in place to support our staff to make robust assessments and decisions on applications."

One such system involves external auditors, sent out to check green energy instalments.

Mr Fyfe claimed auditors would tend to "push back" against visiting sites in certain parts of the country, including Orkney, Shetland, the Western Isles and Northern Ireland.

He also said Ofgem's policy was to announce their visits two or three weeks ahead of time, and that the regulator would take "quite a sympathetic approach" to excuses such as illness or bereavements, so audits could be delayed to the next quarter, "or kicked into the long grass".

Mr Fyfe took his concerns about the Domestic RHI scheme to senior managers at Ofgem in 2016, but they "pushed back". He argues this was because so many sites had already been accredited and that to admit flaws in the system would have put the scheme into disrepute.

He contacted the National Audit Office, and Ofgem then agreed to hold an independent investigation into his concerns.

He says that what was happening in England, Scotland and Wales "was worse than what was happening in Northern Ireland".

Mr Fyfe said that he was threatened by Ofgem with the use of sweeping powers under Section 105 of the Utilities Act. He says he was told he could be fined large sums or even sent to jail if he spoke out.

In September 2017, he decided to leave his job with Ofgem E-serve.

He sought help from the charity Protect, which aids whistleblowers. This month, he opted to talk openly about his concerns to File on 4, without the protection of anonymity.

According to his allegations, Ofgem had lost control of the system and was recklessly paying out many millions in the form of green energy subsidies which come from taxpayers' funds.

Earlier this year, the Public Accounts Committee investigated the Domestic RHI scheme and found rates of fraud and non-compliance were "too high" and Ofgem had not even estimated the cost of manipulation of the system.

Deputy chairman of the Committee, Sir Geoffrey Clifton-Brown, told File on 4: "If the information from your whistleblower is correct, this amounts to a public scandal and I will be referring it formally to the National Audit Office for them to investigate."