Image caption Sir Tony said he went "a little bit Baldrick" during his investiture ceremony

Sir Tony Robinson says Prince William has agreed to a cameo role in Blackadder if there is ever another series of the hit BBC TV programme.

The 67-year-old comedian and actor said the casting took place as he was being knighted by the Duke of Cambridge.

Prince William told Sir Tony, who played the long-suffering manservant Baldrick, he was a big Blackadder fan.

"I said to him 'would you be prepared to be in it?' He said 'yes' like a shot," Sir Tony said.

"I managed to do a bit of casting while he was awarding my knighthood. I think that is probably a first," he added.

Sir Tony starred in the historical comedy, first broadcast 30 years ago, alongside Rowan Atkinson and a host of other stars including Tim McInnerny, Miranda Richardson, Hugh Laurie and Stephen Fry.

Asked by the prince about plans for a possible fifth series, Sir Tony joked: "I don't know if we can afford Hugh Laurie."

As to who William would play, Sir Tony said: "I think he would have to play himself."

Of the investiture ceremony, Sir Tony said "a little bit of Baldrick crept over me", referring to his bumbling, hapless onscreen character.

"I messed it up completely - I forgot that you were supposed to bow at the beginning, I was just stood there and I was looking at HRH and he was looking at me.

"I stepped forward and knelt. Then I went the wrong way."

Image caption Baldrick, pictured right, was known for his catchphrase: "I have a cunning plan"

His knighthood, announced in the Queen's Birthday Honours, recognises his "lifetime of public and political service with a career as an actor, theatre director, children's author and television presenter".

Although best known for his portrayal of Baldrick, Sir Tony has performed in the West End, at Chichester Festival Theatre and the National Theatre as well as with the Royal Shakespeare Company.

His television credits include Channel 4's archaeology series Time Team, which he presented until it was axed last year.

Last month, it was announced Sir Tony will make his first theatre appearance in 16 years as the narrator, Kenneth Grahame, in the Royal Opera House's production of The Wind in the Willows.

His Blackadder co-star Atkinson was also recognised with a CBE for services to drama and charity.