Film star Sir Ian McKellen spent about three hours at a Christchurch restaurant on Friday night after his flight was cancelled. 

McKellen, who played Gandalf in Sir Peter Jackson’s The Lord of the Rings and The Hobbit films, was at the Etta Restaurant and Bar on Claridges Rd, Casebrook, on Friday night.

The restaurant shared photos of the 87-year-old English actor posing with several staff members.

"So ..... this just happened,” the post read.

“Very privileged to have Sir Ian McKellen and his team in for dinner.

"Thanks to Issac Theatre Royal and CCC for bringing him to Etta.”

McKellen is in New Zealand filming The Lord of the Rings: The Hunt for Gollum. 

He is set to return as Gandalf, with co-stars including Elijah Wood (Frodo) and Andy Serkis (Gollum), for the film which is being directed by Andy Serkis, and written by Fran Walsh, Philippa Boyens, Phoebe Gittins, and Arty Papageorgiou.

Photo: Facebook / Etta Restaurant and Bar

McKellen is holding a copy of J.R.R. Tolkien’s The Lord of the Rings in one of the photos, while he is pictured with kitchen staff in another.

Stuff reported McKellen was expected to spend about 40 minutes at the restaurant, but a cancelled flight meant he was there for about three hours.

Sir Ian McKellen at the Etta Restaurant and Bar. Photo: Facebook / Etta Restaurant and Bar

Etta Restaurant and Bar owner Stephanie Reeves told Stuff: “He tried to pay the bill and leave us a tip but we don’t really do tips.

"So he took photos with all of the staff and went into the kitchen for one.

“One of our chefs is a huge fan and we swapped his shifts so he could be there.”

As well as his LOTR role, McKellen also played Magneto in the X-Men films and has had several successful stage roles.