Image copyright PACEMAKER Image caption Mr Larkin made the comments during a separate case at Belfast's High Court on Wednesday

The attorney general is considering challenging the legality of a botched energy scheme that could cost taxpayers £490m.

John Larkin said he may bring a case against the Department for the Economy for introducing the non-domestic Renewable Heat Incentive (RHI) scheme before it went to the full executive.

He made the comments during a separate case at Belfast's High Court.

"My primary responsibility is as guardian of the rule of law," he said.

"If it's an issue about public money and a claim being made against the government founded on the 2012 regulations, I may be the only person able to put a hand up."

The development came as more than 500 members of the Renewable Heat Association NI Ltd were granted leave to seek a judicial review of Economy Minister Simon Hamilton's plan to cut tariff payments.

The RHI scheme was an attempt by the Northern Ireland Executive to help to increase creation of heat from renewable sources.

But flaws in setting the scheme's subsidy rate left it open to abuse as claimants could earn more cash the more fuel they burned, with the overspend estimated to be about £490m.

Illegal step?

Last month, Mr Hamilton set out revised 2017 RHI regulations in a bid to cut costs and ease the financial burden.

Lawyers for the Renewable Heat Association (RHANI) of Northern Ireland are set to claim this was an illegal step against boiler owners with 20-year contracts.

Part of their case is that 2017 regulations are rendered unlawful because they were not discussed and agreed on by the Executive.

Mr Larkin will definitely now feature in that case after an issue of devolution was raised.

"The 2012 regulations never came before he Executive to be discussed and agreed," he told the court.

"So the point that is made against the 2017 regulations it seems to me can equally be made against the 2012 regulations."

Proceedings have been brought by RHANI and some boiler owners have been granted anonymity in a separate action against Mr Hamilton's plans to publish the identities of those using the scheme.

The attorney general has said his primary responsibility is as a guardian of the rule of law.

But critics suggest the issue presents a conflict of interests for Mr Larkin.

"He has a responsibility to protect the public interest in matters of law, but it is also true that he is chief legal advisor to the executive," said legal affairs expert Joshua Rosenberg.

"Normally it's possible to ride these two horses but you clearly can't take legal action against your colleagues if it's your job to give them legal advice on how to defend themselves in the courts.

"I don't think it's the responsibility of the attorney general to bring this legal challenge - on the contrary I think he's the respondent."