MINISTERS face a court challenge over secret legal agreements which allowed the nationalisation of the owners of the shipyard at the centre of Scotland's ferry building fiasco.

Ministers face proceedings in the English courts over the agreements with Texas-based insurance firm Tokio Marine's subsidiary HCC International Insurance (HCCI) which allowed them to take control of Ferguson Marine Engineering Ltd (FMEL).

It comes as ministers lost a £5m claim made by HCCI in connection with refund guarantees they said were owed to them as part of their secret deal.

Now it has been revealed the ministers face "rectification" proceedings regarding the overall settlement with HCCI which paved the way for the nationalisation of the Ferguson Marine after it went into administration.

Ministers had ploughed in bailout loans totalling £45m to ailing Ferguson Marine, before it fell into administration two years ago and was subject to a state takeover by Scottish ministers.

The Scottish Government's secret deal meant that HCCI would not have to pay £25m in default payments in connection with the construction of two lifeline ferries as a result of the collapse of FMEL.

Having ploughed in millions in public money into Ferguson Marine, ministers became aware that as early as 2017 that HCCI had a legal hold over the assets of FMEL could be an issue and would stand in the way of any state takeover.

READ MORE: Would-be Ferguson Marine owner Sandy Easdale sounds off on Scots ferry fiasco 'national scandal'

While finance secretary Derek Mackay was telling the public one £30m loan was “to further diversify their business", internal documents state the real reason was that FMEL was in financial trouble and at risk of falling into administration.

The Herald:

But ministers sought to ensure there was a “right to buy” of FMEL when it provided the £30m loan knowing it was creating a path to a controversial state ownership.

The secret takeover deal was hatched with HCCI by the Scottish Government as FMEL executives lodged complaints just before the firm went under, saying ministers were not serious about keeping it afloat and were keeping them out of vital discussions.

Ministers said they believe they were acting in the public interest in taking control of FMEL, as it saved the yard from closure, rescued more than 300 jobs and ensured that the two vessels under construction will be completed.

But the delivery of the lifeline island ferries at the centre of the row, MV Glen Sannox and Hull 802, is between four and five years late with the cost of construction double the original £97m contract agreed in 2015.

READ MORE: Ferguson Marine: Ministers lambasted for 'disdainful dismissal' of inquiry's 'catastrophic ferry failure' findings

At the centre of the dispute are refund guarantees, commonly used in shipbuilding, providing security to Caledonian Maritime Assets Ltd (CMAL), the taxpayer-funded company which owns and procures ferries that if FMEL failed to build the ferries, it would be able to recover advances it had made. In 2016, HCCI, provided two guarantees which acted as an 'insurance' against the company going under and would allow for the completion of two lifeline ferries.

At the same time FMEL granted a deed which would compensate HCCI if there was likely to be a claim.

That also gave HCCI a security over the assets of the Port Glasgow shipyard.

HCCI said that deed also gave them the right to cash if there was likely to be a claim or demand under the 'insurance' offered.

In the midst of FMEL's financial and ferry-building, problems, in July, 2019, Mr Jason Higgs, a restructuring practitioner and partner with PWC noted that HCCI held securities which would make it more difficult for the Scottish Government to find a "funding solution" and moves were begun to remove them from the picture.

The Herald:

That involved the release of the two guarantees in return for HCC's release of their hold over FMEL's assets.

That would also mean £4.5m cash collateral sum held by HCCI being made available to FMEL.

Court papers show that an agreement ensuring HCCI were not liable to pay the £25m 'insurance' came after a period of discussions was initially reached in August 16 - six days after the shipyard firm fell into insolvency.

After administrators moved in on October, 2019, ministers moved in to take control of FMEL.

But after the refund guarantees were ripped up, HCCI said it was due £5.047m including costs and expenses which was paid to CMAL under another agreement.

In a ruling Lord Tyre agreed. He said: “I hold that HCC has proved that it is entitled, in terms of the documentation as it stands, to payment of the sums sued for.”

But he has suspended making an order over payment until legal proceedings in England over the terms of the agreement between HCCI and ministers are finished.

The Scottish Government had said that it was in the "interests of justice" to wait till those proceedings were finished before Lord Tyre took his decision.

A Scottish Government spokesman said: “As this claim is ongoing, we are unable to say anything further at this stage.”

In January, opposition parties were united in condemnation over ministers' rejection of the "catastrophic failure" conclusion of an inquiry into the ferries' procurement.

Confidential documents revealed by the Herald showed that the Scottish Government knew FMEL was in danger of financial collapse two years before it undertook the state takeover.

The secret takeover deal was hatched with HCCI by the Scottish Government as FMEL executives lodged complaints just before the firm went under, saying ministers were not serious about keeping it afloat and were keeping them out of vital discussions.

The Herald:

Documents showed that two weeks before FMEL went into administration, directors thought ministers were still trying to pursue what they called “the solvent solution” involving keeping it intact as a private business while behind the scenes ministers had created a pathway to nationalisation.

Former FMEL managers subsequently accused the Scottish Government of having no serious intention of leaving it in private ownership while being warned nationalisation would be subject to EU state aid laws.

They accused ministers of forcing it into insolvency by rejecting a plan that would have avoided any state aid claim, save the taxpayer at least £120m, and prevent the costs of building two key lifeline ferries soaring to over £230m.

The former management have described the process to ensure the Scottish Government could nationalise as “highly secretive, highly irregular and unusual”.

In January, former management of the shipyard further accused ministers of losing millions of pounds of valuable orders – projects with “huge opportunities lost” – while condemning the actions which created a secret pathway to nationalisation.