TV cameras will be allowed to film the sentencing in a criminal trial for the first time next week, after Scottish broadcaster STV was granted permission to record the conclusion to a murder case.

STV will film the sentencing of David Gilroy for the murder of his former mistress Suzanne Pilley next Wednesday (18 April) in the High Court in Edinburgh, with the Judiciary of Scotland confirming that it is "the first time that permission has been granted to film during a sentencing diet in the High Court".

STV – the Scottish arm of ITV – will film Judge Lord Bracadale when he hands down Gilroy's sentence; however, Gilroy and Pilley's family will not be shown.

The move was approved by Scotland's most senior judge, the Lord President and Lord Justice General, Lord Hamilton. The recording will then be shared with other TV networks.

A spokesman for STV said: "This is the first time in the UK that TV news cameras have been allowed to film a sentencing in a criminal court, and we're pleased that STV has been instrumental in making that happen. This development will allow viewers a rare insight into the closing stages of what has been a very controversial murder case."

The news comes ahead of new legislation allowing courtroom proceedings to be televised, which is expected to be announced in the Queen's speech next month.

In a joint letter sent in February this year, the BBC, ITN and Sky News called on Prime Minister David Cameron to push through the legislation.

The letter came after Justice Secretary Ken Clarke announced last September that the ban on televised court proceedings was set to be lifted in an effort to improve public understanding of the justice system. Clarke stated that broadcasting would initially be allowed from the Court of Appeal, and that the Government would "look to expand" to the Crown Court later.

Proceedings from the UK Supreme Court began to be broadcast over the internet in May last year, with a live stream of the court's hearings and judgments also available on Sky News.