Kelsey Grammer has joined the cast of 'Transformers 4'.

The 'Frasier' star will play the main human villain in Michael Bay's fourth chapter of the futuristic alien robot franchise, Deadline has revealed.

The 58-year-old actor is set to star as scheming counter intelligence officer Harold Attinger, who has reportedly hatched a plan to use Cybertronian technology as weapons research for mankind.

He will join the brand new cast of Mark Wahlberg, Stanley Tucci, Jack Reynor and Nicola Pelz in the big-budget blockbuster.

The role marks a departure for Grammer, who - aside from playing Beast in 'X-Men: The Last Stand' - has rarely graced the big screen.

The star is not the only unusual casting choice, however, since it was announced last month four roles would be chosen thanks to a Chinese reality TV show.

A panel of esteemed judges formed of producer Lorenzo DiBonaventura, casting director Denise Chamian and the former head of the Academy of Motion Pictures Arts and Sciences, Sid Ganis, will select two professional actors for parts in the film, while two more roles will go to amateurs.

Rising star Jack Reynor recently revealed the new movie would take a ''definite step away'' from the previous three films.

He teased: ''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.''