The brother of Diana, Princess of Wales, has claimed he was lied to about the desire of William and Harry to walk behind their mother’s coffin.

Earl Spencer said he raised objections with royal officials before being told her sons wanted to do it, adding he later realised this was not the case.

He also described the feeling of walking behind Diana’s coffin in the funeral cortege as the “most horrifying half hour of my life”, acknowledging he still has nightmares about the “harrowing” event from 20 years ago.

But Spencer said he believed the experience was a “million times worse” for Diana’s sons.

William, now the Duke of Cambridge, was 15 and Prince Harry 12 when their mother was killed in a car crash in Paris on 31 August 1997.

A huge outpouring of grief followed her death, which shocked the world. Spencer paid tribute to his sister during the funeral service at Westminster Abbey, in a highly personal speech which highlighted her difficulties with the media and the royal family.

He promised to care for William and Harry, with his reference to the Spencers as Diana’s “blood family” seen as deeply wounding to the Windsors.

Spencer said he understood the Queen believed he had “every right to say whatever he felt” and recalled keeping the speech secret to prevent anyone else having a say in it.

As the 20th anniversary of Diana’s death nears, Spencer told BBC Radio 4’s Today programme it was a “very bizarre and cruel thing” for Diana’s two sons to be asked to walk behind her body.

He said his sister would not have wanted it and told officials of his objection, adding: “Eventually I was lied to and told they wanted to do it, which of course they didn’t but I didn’t realise that.”

Spencer described the feeling of walking behind Diana’s coffin as the “worst part of the day by a considerable margin”.

He said: “The feeling, the sort of absolute crashing tidal wave of grief coming at you as you went down this sort of tunnel of deep emotion, it was really harrowing and I still have nightmares about it now.

“So there was the inner turmoil of thinking, ‘My God this is ghastly’, but then the point of thinking these two boys are doing this and it must be a million times worse for them.

“It was truly horrifying, actually.

“We would walk a hundred yards and hear people sobbing and then walk round a corner and somebody wailing and shouting out messages of love to Diana or William and Harry, and it was a very, very tricky time.”

Spencer said he saw the eulogy for his sister as a chance to “speak for somebody who had no longer got a voice”, adding: “I don’t feel I said many pointed things. I believe that every word I said was true and it was important for me to be honest.

“I wasn’t looking to make any jabs at anyone actually. I was trying to celebrate Diana – and if by doing that it showed up particularly the press, I think, in a bad way, well, they had that coming.”

He said he had reread the eulogy speech for the first time in 20 years before the BBC interview.

Asked if the Queen or anyone else had said anything to him about the speech, Spencer replied: “Somebody I know very well said to her: ‘What do you think?’ and she said: ‘He had every right to say whatever he felt. It was his sister’s funeral.’ So that’s all.”

Spencer said the highly personal nature of the eulogy meant he wanted to “protect it before delivering it” so no one else could have a say in it.

He added he had read the speech to Diana’s body in St James’s Palace chapel a couple of days before she was buried, saying: “I know people will think I’m some sort of fruitcake but I do remember hearing almost some sort of approval then, and then I realised actually I had probably got the thoughts in order.”