SIR Tom Devine has stepped into a row over commentary and laughing on the BBC about Catholics having been “cleared out of Scotland” by John Knox.

Sir Tom, who is emeritus professor of history at Edinburgh University, revealed he was a contributor on the broadcaster's live television coverage of the royal cortege travelling from Balmoral to Edinburgh last Sunday but withdrew ahead of the controversial remarks.

He told The Herald he had a sense of "accidents waiting to happen" while taking part in the programme.

The BBC apologised yesterday following complaints about the exchange and the reaction it prompted in the studio.

But last night Sir Tom, who is the only Scottish historian to have been knighted by the late Queen Elizabeth, said those involved should make their own personal apologies.

"The BBC invited me to take part by Zoom in the broadcast of the late Queen’s final departure from Balmoral and the journey of the coffin from there to Edinburgh. I was honoured to accept," said Sir Tom in a statement to The Herald.

"However, I was not informed that there would be two other guests involved. From the early amateurish comments of this pair I was certain that they were accidents waiting to happen and so I broke off my Zoom connection to the programme in the early stages."

He added: "Since then I have read about the scurrilous discussion which took place between them thereafter concerning John Knox ‘clearing’ Catholics 'out of Scotland’.

"The comment then apparently triggered mutual glee between the two. If I had been still on air at the time I would have had difficulty preventing the opening of the verbal flame thrower which would have been deeply inappropriate given the solemnity of the occasion."

Sir Tom went on to say the claim that John Knox 'cleared' Catholics out of Scotland was false and the laughter which the remark triggered offensive.

"Two points need to be made. First the claim is erroneous. Knox died in 1572 and at that date the vast majority of the Scottish people remained Catholic," he said.

"Second, the subsequent hilarity is offensive to the Catholics of Scotland today who make up around 16 per cent of the country’s population and a much higher proportion in the west central region.Think of the outrage if Scots of Muslim faith and descent has been vilified in this way.

"The BBC has offered an apology for this incident but the two perpetrators should be named and also make their own personal apologies to the public."

Viewers quickly expressed their upset last Sunday on social media.

The remarks came after BBC presenter Martin Geissler mentioned Knox, the radical minister during the Scottish reformation. Guest contributor Robert Lacey, a royal historian, then said: “John Knox of course being your great Scottish Protestant reformer, who cleared the Catholics out of Scotland.”

Mr Geissler replied “that’s how history remembers him”. Laughter could be heard from people in the studio. At the time of the remark, Mr Geissler, Mr Lacey and other people in the studio were off-camera.

Among those who complained was Chris McEleny, the general secretary of Alex Salmond’s Alba party.

Asked about the exchanges and the complaints about them, a BBC spokesman said: "We are sorry for the offence caused by the unscripted exchange during our live coverage of the cortège carrying the Queen’s coffin."

In response to Sir Tom's concerns the BBC referred to its previous apology and told The Herald it had nothing more to add.

Thousands of people turned out last Sunday along the route to bid farewell to Queen Elizabeth for what the King described as her “last great journey” from Balmoral Castle, where she died the previous Thursday, to the Palace of Holyroodhouse in Edinburgh.

A seven-car cortege carrying her coffin gave mourners the opportunity to pay a final tribute to the country's longest-serving monarch. She was taken on Monday to St Giles' Cathedral on the Royal Mile to lie in rest before being moved to Buckingham Palace in London on Tuesday.

The King led the procession behind the Queen's coffin from Holyroodhouse to the cathedral for a service of thanksgiving for her life. The Reverend Calum MacLeod told the congregation the ceremony was "Scotland's farewell to our late monarch".

Around 33,000 people in Scotland paid their respects to the Queen as she lay at St Giles’ Cathedral with many mourners queuing throughout the night.