Styles joins a cast that includes Florence Pugh and Chris Pine.

Harry Styles has found his next movie role following Christopher Nolan's 2017 war epic Dunkirk.

The Fine Line singer, 26, joins Olivia Wilde's psychological thriller, Don't Worry Darling, as a replacement for actor Shia LaBeouf, who had to drop out of the project due to scheduling conflicts.

Styles now joins a cast that includes Wilde, Wonder Woman 1984's Chris Pine, and Black Widow's Florence Pugh.

The actor was previously rumored to appear in director Dan Gilroy's Faster, Cheaper, Better due to a listing on the website for the project's international distributor. However, sources confirmed to EW that was not accurate.

Don't Worry Darling, which Wilde also directs and produces, is set in the 1950s at an isolated, utopian community in the California desert. New Line acquired the film in a competitive situation with 17 other bidders and production is now aiming to start filming this fall.

Screenwriter Katie Silberman, who wrote Wilde's directorial debut Booksmart, writes the screenplay based on a spec script by Shane and Carey Van Dyke. Wilde and Silberman are also teaming up for a Marvel movie at Sony.

Deadline was the first to report the news.

Want more movie news? Sign up for Entertainment Weekly’s free newsletter to get the latest trailers, celebrity interviews, film reviews, and more.

Related content: