Sir David Jason is returning to comedy to appear in a new BBC One sitcom about a former soldier who is mistakenly put in charge of royal security.
The Royal Bodyguard sees Sir David's character accidentally promoted to the role despite previously only working in the Buckingham Palace car park.
The series begins production in July.
It will be the 71-year-old's first comedy role since Only Fools and Horses ended in 1991, although Christmas specials continued until 2003.
Sir David has since been known for his drama work, including starring as police detective Jack Frost in ITV's A Touch of Frost.
"I am really looking forward to working on a great comedy project with the BBC. It will be good to have a laugh again," the actor said.
BBC One controller Danny Cohen, who commissioned the show, said: "I am absolutely delighted to welcome David Jason back to a leading comedy role on BBC One.
"David is a hugely talented performer and much loved by British viewers."
The Royal Bodyguard is being made by Hat Trick Productions and is written by The Worst Week Of My Life creators Mark Bussell and Justin Sbresni.