Sir Ian McKellen delighted a group of young students by giving a rousing speech as his wizard character Gandalf to encourage them to revise for exams.

The veteran actor appeared at a school in Bristol, England on Sunday (19Oct14) and took on his iconic role from The Lord of the Rings franchise to address a cheering group of youths.

MCKellen told the youngsters, "In your preparation for your examinations, if you don't do your revision properly, do you know what will happen? You shall not pass!"

The X-Men star visited Chew Valley School to discuss gay rights issues and the challenge of preventing the use of homophobic language in educational institutes.

He posted a message on Twitter.com, writing, "At Chew Valley School to talk to staff and students about gay issues. I learned about exceptional work they have done to eradicate bullying."