Key: Gay gaffe not behind Gandalf no-show

New Zealand Prime Minister John Key is rejecting speculation his "gay" gaffe is the reason one of The Hobbit's stars is skipping the film's world premiere in Wellington.

Sir Ian McKellen, who plays Gandalf in the films, will not attend the premiere of The Hobbit: an Unexpected Journey on November 28.

In a statement to The One Ring website, Sir Ian said it was thrilling the cast and crew would reunite in Wellington, and he was envious of them.

"As ever, my heart is in Wellington, and I send my love," he said.

His absence has prompted speculation the openly gay star is boycotting the premiere after taking offence to the prime minister's on-air remark that a radio host's red top was "gay".

Earlier this month, Sir Ian slammed Key's comment in a blog post and urged him to "watch his language".

"I'm currently touring secondary schools in UK, attacking homophobia in the playground and discouraging kids from the careless use of 'gay' which might make their gay friends (and teachers) feel less about themselves," Sir Ian wrote.

However, Key says he does not believe that's the reason Sir Ian won't be in Wellington next week.

"I'd be amazed if that was the case," Key said.

"I don't know why he's not coming, but I'd be amazed if it would be over that."