After skipping the last installment, Josh Duhamel is set to return to the “Transformers” franchise, rejoining director Michael Bay, who helmed the previous films.

Mark Wahlberg, who is also returning for “The Last Night,” announced the news on Twitter.

.@joshduhamel welcome back to the #transformers family. This is gonna be good. — Mark Wahlberg (@mark_wahlberg) May 17, 2016

The movie opens on June 17, 2018, with shooting starting next week in Cuba. The pic will also be filmed in Detroit.

Bay has directed the four movies in the franchise, which have grossed a collective $3.8 billion worldwide and are based on Hasbro’s toy line. The original “Transformers” opened in 2007. Shia LaBeouf starred in the first three films.

“Transformers: Age of Extinction” grossed $245 million domestically and $859 million internationally in 2014.

Lorenzo di Bonaventura, Don Murphy and Tom DeSanto will produce “Transformers: The Last Knight” with Hasbro.

Duhamel was last seen in the Hulu limited series “11.22.63” opposite James Franco. He also has the indie “This Is Your Death” co-starring Famke Janssen, on the horizon.

Duhamel is repped by ICM Partners and John Carrabino Management.