Leonard Nimoy will come out of retirement for 'Transformers: Dark of the Moon'.

The 80-year-old star - who is most famous for the role of Spock in the 'Star Trek' TV show and movies - announced he was quitting acting last year but has been convinced to take on a role as the voice of Sentinel Prime in the third movie in the franchise starring Shia LeBeouf.

Prime, the predecessor of Optimus Prime - whose wrecked body has featured in the movie's trailer - is found crash-landed on the moon by the Apollo 11 astronauts in 1969. After being brought to earth, he disguises himself as a fire engine to take part in the film's final battle scenes

This won't be his first time taking part in the science fiction action film series, Leonard voiced the character of Galvatron in 'TheTransformers: The Movie' in 1986.

Director Michael Bay revealed he wanted the veteran star to appear in the second film of his rebooted 'Transformers' series 'Transformers: Revenge of the Fallen' but was too frightened to ask him.

He explained to EW.com: "I was too scared to ask him. Plus, he's married to Susan Bay, who's a cousin of mine. So I had to be careful. I've met him at family functions. But he told me, 'I would be honoured. I'm glad to be back!'"

Michael also claims he has made a number of changes to the series after the second movie was critically savaged.

He said: "The robots have more character in this movie. Much more. You really understand their struggle, on both sides actually,"