Former First Minister Arlene Foster unlawfully blocked Executive discussion of a funding plan aimed at clearing a backlog of legacy inquests for purely political reasons, the High Court has heard.

The DUP leader stopped the blueprint getting on the agenda because it could "rewrite the past" in Northern Ireland, it was claimed.

Counsel for the widow of an innocent civilian shot dead along with eight IRA men also blamed the governments at Westminster and Stormont for leaving the coroners service in a state of collapse by starving it of resources.

Barry Macdonald QC said: "This is not just unlawful conduct, it's conduct that represents a quite brazen challenge to the rule of law itself."

Brigid Hughes is seeking to judicially review the administrations in London and Belfast for failing to release the funds necessary to hold a series of inquests into Northern Ireland's troubled history.

Her husband, Anthony, died after being unwittingly caught up in the SAS ambush of an IRA unit at Loughgall, Co Armagh in May 1987.

The legal challenge is being taken against the Secretary of State, the Stormont Executive and Mrs Foster personally due to her alleged responsibility for the logjam.

More than 50 legacy inquests relating to nearly 100 deaths remain outstanding, with only one currently listed for hearing in 2018, the court heard.

Northern Ireland's Lord Chief Justice, Sir Declan Morgan, has advanced a plan for having all cases dealt with within five years.

With those costs estimated at around £10m, the government had said resources will not be released until political consensus is reaching on dealing with the past.

Part of the litigation involves claims of political discrimination being made against Mrs Foster.

A press report where she referred to a perceived skewing towards inquests into state killings pointed to a discriminatory approach, according to Mrs Hughes' lawyers.

Opening the case being heard by Sir Paul Girvan, Mr Macdonald insisted funding had been deliberately denied, with no attempt to conceal it.

A paper based on Sir Declan's proposed solution was drawn up before Mrs Foster stopped it from reaching Executive discussion, he claimed.

Funding was instead contingent with securing a comprehensive settlement on all other legacy issues.

"The reason the former First Minister blocked this was to prevent these cases being heard," Mr Macdonald alleged.

"The reason she didn't want them to be heard was because they mostly concerned state killings; she thought there was too much attention being paid to state killings, she wanted more attention paid to victims of paramilitary killings.

"The inquest process was liable to rewrite the past and she would not allow that process to rewrite the past."

Asked by Sir Paul how tribunals aimed at establishing the truth around deaths could have such an outcome, Mr Macdonald replied: "The perception by the former First Minister was that this would perhaps change the perception of the past if new facts emerged.

"That's what she was determined to prevent, for political reasons she was prepared to prevent a legal process taking place."

He argued that she acted unlawfully based on human rights legislation and obligations to avoid delay and ensure access to the courts.

"The applicant and other next of kin in the same situation are being systematically denied their legal entitlement to a court hearing," counsel added.

"In their defence the respondents are saying 'this case is nothing to do with us, and if it has it's none of the court's business, these are political decisions'.

"The question for the court is can the executive lawfully thwart the applicant's legal right to a court hearing for political reasons."