A DUP special adviser sent anonymous emails to the media and a top civil servant with the knowledge of his minister in order to take pressure off the party, it has emerged.
The revelation came on Tuesday at the Renewable Heat Incentive (RHI) inquiry.
Former DUP economy minister Simon Hamilton was giving evidence.
The scheme was created in 2012 to boost uptake of eco-friendly heat systems, but huge subsidies left NI taxpayers with a £490m bill.
Its failings led to the establishment of a public inquiry in January 2017.
Simon Hamilton is the final DUP representative to give evidence.
On Tuesday afternoon, it emerged that his former adviser, John Robinson, sent anonymous emails to the economy department's permanent secretary in early 2017 in an attempt to shift the focus from the party over the scheme's fallout.
Mr Hamilton admitted it had been done with his full knowledge.
The emails were also sent to journalists at the BBC and the News Letter.
They detailed contacts between civil servants in the enterprise department and the agri-food industry in summer 2015.
They showed that information had been inappropriately shared that may have contributed to a spike in boiler applications that autumn.
Mr Hamilton said he felt the emails were potentially explosive because they cast "significant doubt" on the narrative that DUP special advisers' "meddling" had been responsible for the spike.
In particular, they were helpful to DUP special adviser Andrew Crawford, who had been named as the man responsible for the cost control delays, and had been blamed for sharing information with the biomass industry.
The inquiry panel expressed shock that a minister would have connived in the sending of anonymous emails to his own permanent secretary.
'Not my proudest moment'
Mr Hamilton conceded that it had not been his "proudest moment".
He said at the time the DUP had been under significant attack from all sides and had very little to "fire back".
"That sometimes leads you to do things you would not normally do," he added.
He said had he passed them formally to Mr McCormick, he feared they would get "bogged down" in a process.
He wanted them out in the public domain where they could assist the party.
Inquiry chair Sir Patrick Coghlin said what he had done was to use the "cloak of anonymity" to shift the blame from the DUP to civil servants, for whom he had responsibility as minister.
Mr Hamilton accepted that the way it had been handled had been "highly unorthodox" and blamed the "highly febrile atmosphere" of the time.
He also said the emails were not confidential government documents.
Inquiry panellist Dame Una O'Brien questioned how the action could have improved the situation, saying Mr Hamilton and Mr McCormick's relationship was "meant to be built on trust".
Mr Hamilton said it had not been done to undermine him.
Earlier, the ex-DUP minister told the inquiry he believed one of the department's RHI cost cutting proposals was leaked to the media by Sinn Féin in a bid to undermine a solution.
In mid-December 2016, the economy department was considering a number of options, one of which was a one-off buy-out payment, to lower the scheme's overspend.
It was later leaked to the media, and drew a critical response from politicians and business representatives.
Officials then decided not to go with that plan, and instead followed measures that saw the scheme's tariffs offered to claimants reduced, initially for one year.
Mr Hamilton set out to the inquiry why he believed Sinn Féin had leaked the proposal.
"There was pressure on the DUP, we were under immense pressure at the time, if a solution was to come, Sinn Féin wanted to be part of it," he said.
He said if a plan was to be put forward that worked, Sinn Féin wanted to be the "saviours", but if the plan did not work, then "the DUP were to blame".
"I feared they were trying to undermine any solution," he added.
Sinn Féin has denied it caused the leak, but Mr Hamilton said neither he nor anyone in the economy department had done it, as it was not in the department's interests.
He said he was "raging" after that occurred, adding that: "I felt we were almost back to square one."
In February 2016, the RHI scheme had already been closed, but its major budgetary overspend still needed to be dealt with.
On Tuesday, Mr Hamilton said when he came into post three months later, he felt civil servants were not addressing the issue with as much urgency as he was; that officials seemed "shell-shocked" and were not concentrating on the most important matter.
He said they expended a huge amount of energy on blind alleys rather than working up a plan to cut the massive costs.
"I did push, I did ask, but I regret I didn't push even more and was insistent on a paper by a particular date, but I was assured work was ongoing," he said.
But Sir Patrick said what was needed was "leadership".
He said that when Mr Hamilton met senior officials in his department to discuss the crisis "no dawning of leadership took place".
Dame Una said it was within Mr Hamilton's power to exert more authority on his officials or to insist on regular update meetings.
She said as someone who had previous ministerial experience he ought to have been aware of actions he could have taken.
Mr Hamilton agreed, but said he had been assured that complex work was taking place and he wanted something that was legally robust.
However, he said when the cost-cutting proposals were finally brought to him in late October, they were brief and almost devoid of detail.
"I didn't want something to come before me that was shoddy, but the sad truth is when it did come before me - it was shoddy," he said.
It did not contain any options to cut the costs.
He was unhappy with it and it was binned.
But Mr Hamilton said although things were not moving with as much urgency as he wanted them to, at this point he felt there was "no frenzied atmosphere".
Just several months later, a BBC Spotlight programme exposed the full scale of the RHI scandal, which led to a political fall-out that ultimately collapsed the Stormont assembly.
Mr Hamilton said in autumn 2016, there was no prospect then of the assembly collapsing, and there was still good time, in his mind, to get a solution passed.
'Go to war'
On Tuesday afternoon, former finance minister Máirtín Ó Muilleoir rejected claims that his party tried to score political points over the flawed RHI scheme.
His evidence to the public inquiry followed the appearance of Simon Hamilton, who claimed Sinn Féin leaked information about the scheme to the media.
The Sinn Féin assembly member is the first and only representative from his party to give evidence.
He was to give approval to the economy department's cost control proposals in his role as finance minister and also set up the public inquiry in January 2017.
Mr Ó Muilleoir told the inquiry there was "no evidence" that he had ever leaked any information from the economy or finance departments.
Nor did he instruct anyone to do it on his behalf, he added.
Mr Hamilton had claimed in his evidence that Mr Ó Muilleoir was difficult to work with and accused him of "interfering and stepping beyond his brief".
When that point was put to him, Mr Ó Muilleoir replied: "So while (Mr Hamilton) says he doesn't like my style of business, I respected absolutely confidentiality in my own department and in his."
When he became finance minister in May 2016, Mr Ó Muilleoir said he wanted his officials to "go to war" in getting Stormont's economy department to find a way to cut the cost of the RHI scheme.
He told the inquiry civil servants in his department made it clear the initiative was a "threat" to Northern Ireland's finances.
He said he "didn't dilly-dally" when his officials urged him to "get down and dirty" with Mr Hamilton to get the RHI's budget overspend sorted.
That is directly in contrast to what Mr Hamilton told the inquiry on Tuesday - he said the RHI was only raised by Mr Ó Muilleoir three times and never in a demanding way.
That led inquiry chair Sir Patrick Coghlin to describe the economy and finance departments as "alley cats fighting" over plans to cut costs to the RHI scheme.
'Alley cats fighting'
He said given the "clear threat" to public funds because of the scheme's overspend, there should have been a degree of positive cooperation between the economy and finance departments.
The economy department set up the scheme and had to bring forward cost cutting proposals, while the finance department had to scrutinise and approve them.
Sir Patrick said in light of Mr Ó Muilleoir's evidence, the inference was that the departments were like "two alley cats fighting, and walking around each other".
"If an ordinary member of the public whose tax money is being lost here, stood back and looked at this and did so with the hope there was cooperation to try to solve his loss of money, I doubt if he would have any great confidence in what was going on," said Sir Patrick.
Mr Ó Muilleoir said he apologised if the panel felt he should have been "more collegiate" at that time, but said there was a "crisis going on" involving the DUP.
"I can't even today divorce my actions from my determination not to let the DUP say, 'well it's the department of finance's fault as well," he told the inquiry.
'Courtesy, not permission'
Later, Mr Ó Muilleoir denied he asked a senior Sinn Féin backroom figure for permission to sign off on cost cutting proposals to the flawed RHI scheme in January 2017.
It saw a decision to reduce the scheme's tariffs for all claimants for one year, at first.
The inquiry has seen evidence that Mr Ó Muilleoir sent an email to Ted Howell, days before he approved the measures, asking if Mr Howell would be "content" for the minister to sign off on the recommendations.
Mr Howell had been involved in negotiations for Sinn Féin for years, and had retired, but Mr Ó Muilleoir said that prior to the collapse of Stormont in early 2017, he had been asked to come back and chair a party "crisis committee" about the political problems.
It was put to Mr Ó Muilleoir by inquiry counsel Donal Lunny that he was asking Mr Howell for permission.
The Sinn Féin MLA rejected that and said he was simply informing Mr Howell of the decision he had made, and planned to go ahead with publicly.
"I was telling him as someone who is heading up the crisis committee this is when it's going to happen," he said.
He described it as a "courtesy", not permission.
"This is a political world, we could not divorce what was happening outside from the confines of Clare House (where the finance department is based)," Mr Ó Muilleoir added.
"I think it was prudent to say to the Sinn Féin chair of the crisis committee, this is when it was going to happen."
The inquiry's oral hearings are due to end on Friday, after 111 days of evidence heard by the panel.