THE First Minister and her Justice Secretary have been criticised for failing to stop “heavy-handed interference” with the media by the Scottish Prison Service (SPS).

Scottish Labour leader Richard Leonard called for a public inquiry into the government’s action after the SPS tried to gag newspaper coverage of a prisoner’s death.

A Fatal Accident Inquiry ruled last month that Allan Marshall’s death at HMP Edinburgh in 2015 after a lengthy struggle with staff had been “entirely preventable”.

The Sunday Mail newspaper last month tried to publish CCTV footage showing Mr Marshall and prison officers, but the SPS went to court late at night to stop it on the grounds that, even when pixelated, the images could lead to identification of staff and endanger them.

The SPS gave up a few days later and the images were printed in the Daily Record.

At FMQs, Mr Leonard said the court action was brought in the name of Scottish Ministers and Mr Yousaf had been told of it at 1130pm on a Saturday night, but did not stop it.

“When did she become aware of the interdict being served? Did she authorise the legal action? Was it the Cabinet Secretary for Justice? Was it both of them?” he asked.

As relatives of Mr Marshall watched from the public gallery, Ms Sturgeon gave her condolences to his family and friends for their “grief and anguish”.

She then said the initial decision was made by the SPS, and its later one not to proceed with its legal action was “the right one”.

Mr Leonard said: “Let us be clear: Allan Marshall died following a shocking incident in prison service custody. The sheriff says that his death was ‘entirely preventable’. The Government went to court in the dead of night to keep it out of the public eye. Does the First Minister regret that heavy-handed interference in the freedom of the press?”

Ms Sturgeon said: “I had no role in it. The decision to initiate court action was taken by the Scottish Prison Service, as an employer, to allow for a fuller consideration to be undertaken.

“The CCTV footage was viewed by the fatal accident inquiry. I have since viewed the CCTV footage in full, and the Cabinet Secretary for Justice has offered to meet Allan Marshall’s family. take such matters extremely seriously because I take very seriously the responsibilities of the state when individuals are in custody.

“It is up to this Parliament’s committees to decide whether they want to carry out further inquiries into what happened; it is not for me to interfere with that.

“However, Richard Leonard should be under no illusions about the seriousness with which my Government and I treat such issues.

Ms Sturgeon’s official spokesman later confirmed My Yousaf could have intervened to stop the Scottish Prison Service’s action, as it is accountable to him, but did not do so.

Mr Leonard and his justice spokesperson James Kelly MSP later called on Holyrood’s justice committee to launch their own investigation into the matter.

After FMQs, Sharon MacFadyen, Mr Marshall’s aunt, said: “Allan’s death has devastated our family and the attempts to stop journalists reporting on what went on inside the prison was disgraceful. The family is thankful for Richard Leonard for raising Allan’s case to the First Minister and we will continue to campaign for justice for Allan.”