Sir Ian McKellen has said that he and Dame Judi Dench once sneaked into the throne room in Buckingham Palace without anybody knowing they were there.

The actor also told of a time he was told off for smoking a cigarette while at the palace, and joked that the royal residence “brings out the worst” in people.

Recalling a time he had been mischievous, Sir Ian told The Graham Norton show: “Judi Dench and I were once at a dinner at Buckingham Palace. Once the banquet was over we followed music into another room that looked vaguely familiar.

“We were dancing around when we realised it was the throne room.

Graham Norton Show
Presenter Graham Norton stands behind (left to right) Sir Ian McKellen, Carey Mulligan, Taron Egerton and Michael Buble, during the filming of the Graham Norton Show (Matt Crossick/PA)

“There was no one else there and no sign of the thrones so we went in search and when we found them behind a screen, we sat on them!”

Speaking of a separate incident, Sir Ian, 79, said: “I was doing a concert and was given a dressing room right next to the balcony and decided to have a fag on it.”

The film, TV and stage star said that he was enjoying his cigarette with a view of The Mall when a search light shone on him, and a police officer shouted up to remind him he was in Buckingham Palace.

“Six months later I was there to get a medal and as I walked through the gate with a friend the same policeman said, ‘Not you two again!'” Sir Ian added.

Sir Ian, who has just revealed he will celebrate turning 80 in May next year with an 80-date tour of theatres across the country, was joined on Norton’s show by actors Carey Mulligan and Taron Egerton, and singer Michael Buble.

Asked why he is undertaking the mammoth tour next year, Sir Ian said: “I am beginning to wonder!

“Stand up is the greatest discipline so next year I am doing lots of one night stands. It’ll be busy and fun.”

The Graham Norton Show airs at 10.35pm on Friday on BBC One.