Hollywood star Ian McKellen battled with British comedian Ricky Gervais over the script for his appearance in The Office creator's comedy Extras.
McKellen plays himself in an episode of the forthcoming second series of the BBC show, which parodies celebrities and their diva-like behaviour.
Writing on his official site, McKellen says he found it difficult to follow the initial script and attempted to rewrite his lines, but has not admitted the final outcome of the scene.
He says: "There are many jokes in this episode of Extras, one of them being that Ian McKellen is gay and also that he is insufferably pompous.
"That makes for tricky territory, particularly when the script has been written by two experts in irony, masters of the put-down, the snigger and the snub, Ricky Gervais and his partner (in, I'm pretty sure, the non-sexual sense) Stephen Merchant."
In the script, McKellen insists on being referred to as Sir Ian - despite the fact the Lord of the Rings actor does not use the title professionally.
He explains: "I called Ricky Gervais to suggest the script had got me wrong, a little. I am one of those knights who prefers not to use the title professionally. Perhaps Ricky Gervais and Stephen Merchant had confused me with another acting 'Sir'.
"On his mobile, Ricky Gervais was non-committal. You can judge the compromise we made when the episode is aired later this year."