SNP ministers have pledged to begin “urgent work” after admitting they have breached their own legal climate change legislation.

The admission follows a legal threat brought by the Environmental Rights Centre for Scotland (ERCS) and Good Law Project.

The threat of legal action came more than two years after the Scottish Government announced its £26 billion infrastructure investment plan, but still hasn’t published an assessment of the plan’s climate impact.

The campaigners claimed this amounted to a clear breach of its statutory duty under the Climate Change (Scotland) Act 2009.

Read more: SNP threatened with legal action over climate pledges for investments

Earlier this month, the organisations wrote to the Scottish Government's Net Zero Secretary, Màiri McAllan, stating they would launch a legal challenge unless the minister took urgent action to publish this assessment.

The Scottish Government has now accepted that its efforts to date fall short of its duties.

In a letter from the Scottish Government’s litigation division, lawyers said the concerns “have been carefully considered”.

It added: “Scottish ministers now accept that the documentation published to date falls short of the requirements of section 94A of the Climate Change(Scotland) Act 2009.

“Urgent work is underway on a remedy to ensure that the duty is discharged in full and soon as possible.”

Read more: Analysis: Humza Yousaf will need to be unpopular to lead world on climate change

The correspondence points to SNP ministers “accepting the invitation to pursue informal resolution of these matters”.

It adds: “Judicial review proceedings would be premature while the resolution process with ESS is underway and where there is real scope for resolution without the need for litigation.”

Campaigners have asked for further details to be made available by the Scottish Government by October 12.

Dr Shivali Fifield, chief officer at ERCS, said: “While it is promising that the Scottish Government has finally admitted their failure, it is extremely concerning that they are still needing time to publish a climate impact assessment for a plan that is already in progress.

“This breach only came to light because a concerned citizen contacted us. It shouldn’t be left to individuals to suss out whether Ministers are acting lawfully or adding fuel to the fire when confronting the climate crisis.

Read more: Sunak warned by advisers off-track net zero aims 'even harder to hit'

“It is now down to the Government to regain credibility and show that their spending decisions will deliver a just transition towards net zero.”

Emma Dearnaley, legal director at Good Law Project, said: “Governments can try to duck and weave around their duties when their law-breaking is revealed, so it’s heartening that the Scottish Government has owned up to its mistake and committed to correcting it quickly.

“We'll be keeping a close eye on this to make sure the Government follows through.

“With floods and fires sweeping across the world, there’s no time to lose in the fight against the climate emergency. The Scottish Government must now act with the urgency the crisis requires.”

Scottish LibDems climate emergency spokesperson, Liam McArthur, said: "Convincing the Scottish Government to acknowledge an error is no small thing so I am grateful to the Good Law Project and the ESRC for their intervention.

"The impact of the climate emergency is becoming more visible in Scotland year on year. Every decision our governments take must recognise the seriousness of the climate and biodiversity emergencies and be tailored to meeting our climate goals.

"Now that ministers have acknowledged that their infrastructure plans fall short of the challenge ahead of us, they need to come up with a comprehensive plan for moving forward."

A Scottish Government spokesperson said: "Scottish ministers have accepted that the infrastructure investment plan material published to date falls short of the statutory requirement to also publish an assessment of how the plan is expected to contribute to emissions reduction targets.

"Urgent work is underway to ensure that the duty is discharged in full and as soon as possible.

"The Scottish Government is also working with Environmental Standards Scotland to resolve this issue.”