Frasier star Kelsey Grammer has joined the cast of Transformers 4.

The 58-year-old star will play the main human villain in Michael Bay's fourth outing of the futuristic alien robot franchise, according to Deadline.

Grammer is believed to play the part of scheming counter intelligence officer Harold Attinger, who has reportedly hatched a plan to use Cybertronian technology as weapons research for mankind.

Leading man Jack Reynor recently revealed that the new movie would take a "definite step away" from the previous three films, saying: ''There's a whole new direction to take it in, and a lot more to explore in that universe, and I think we're going to make a definitive step away from the previous movies, and this is going to be a lot of fun and I'm incredibly excited.''

Grammer will also join Mark Wahlberg, Stanley Tucci and Nicola in the cast of the film.

Transformers 4 is set to premiere June 27, 2014.