A legal challenge to the election of Liberal Democrat MP Alistair Carmichael will be broadcast live and in full in what is believed to be a television first for a court hearing in Scotland.
The Election Court will sit on Monday and Tuesday at court one of the Court of Session in Edinburgh to hear a legal challenge to the election of Mr Carmichael as the MP for Orkney and Shetland in May.
The Scottish Courts and Tribunals Service (SCTS) has now reached an agreement with STV for the hearing to be streamed live on the broadcaster's website.
Full coverage of the trial will also be aired on the STV Glasgow and STV Edinburgh channels, the broadcaster said.
Gordon Macmillan, STV's head of news, said it would be a "ground-breaking" broadcast.
"This is a significant advance in the televising of the Scottish courts and it will provide an important live insight - most especially for Mr Carmichael's constituents - into the legal process in this case," he said.
The case, which is thought to be the first election petition brought in Scotland since 1965, will be heard by two judges, Lady Paton and Lord Matthews.
The petition was lodged by a number of Mr Carmichael's Orkney and Shetland constituents in a bid to oust him.
The former Scottish secretary came under pressure to quit after admitting responsibility for a leaked memo written by a civil servant which wrongly suggested First Minister Nicola Sturgeon wanted David Cameron to win the general election.
Cabinet Secretary Sir Jeremy Heywood ordered an inquiry after the memo, which claimed Ms Sturgeon told French ambassador Sylvie Bermann that she would prefer to see the Conservatives remain in power, became public.
Following the investigation, Mr Carmichael, who had previously insisted he was unaware of the memo, admitted he had allowed his special adviser, Euan Roddin, to release details of the document which appeared in the Daily Telegraph on April 3.
The legal challenge - funded via a crowd-funding appeal - is being brought under Section 106 of the Representation of the People Act 1983, which makes it a criminal offence to release a ''false statement'' about the character and conduct of an election candidate.
At a previous court hearing, it was decided that there were special circumstances which meant the petition should be heard in Edinburgh rather than in the constituency.
The Judicial Office for Scotland said permission was granted by the Lord Justice Clerk, Lord Carloway, for live broadcast arrangements to be put in place due to the "exceptional circumstances" which the case presented.
Using remotely-controlled cameras, STV has agreed to share the live feed with other media organisations wishing to broadcast on their own platforms.
An SCTS spokesman said: "The Scottish Courts and Tribunals Service held constructive discussions with all parties involved, in reaching an agreement to broadcast the Election Court and we are pleased STV has agreed to facilitate this.
"Guidelines have been put in place to allow proceedings to be streamed live in this exceptional case, which will enable constituents in Orkney and Shetland and across the whole of the UK to view the trial."