Harry Styles is set to join the cast of “Don’t Worry, Darling,” a thriller, which also stars Florence Pugh, Chris Pine and Olivia Wilde.

Styles is taking over the role originally held by Shia LaBeouf, who had to exit the project because of a scheduling conflict, according to Variety.

Wilde is directing the film which will be adapted from a screenplay by Katie Silberman. It is set in a California desert during the 1950s.

HARRY STYLES ENCOURAGES FANS TO FIND 'HAPPY MOMENTS' DURING CORONAVIRUS PANDEMIC

Harry Styles (Handout/Helene Marie Pambrun via Getty Images)

“Don’t Worry, Darling” was highly sought after in Aug. 2019. After 18 bids, which were submitted by various studios for its rights, New Line wound up the victor to purchase the film.

HARRY STYLES SHARES DETAILS ON BEING MUGGED AT KNIFEPOINT

Styles, mostly known for his musical abilities with the band One Direction, made his foray into acting last year in Christopher Nolan’s “Dunkirk” where he was cast by Nolan because the director thought Styles had “an old fashioned face,” which made his role more believable and period-correct.

Wilde took home the Independent Spirit Award for best first feature for “Booksmart,” a coming-of-age buddy film about two high school friends who make up for lost fun on the eve of their graduation.

HARRY STYLES DISCUSSES QUESTIONS ABOUT HIS SEXUALITY

She is also set to direct an upcoming Marvel project and will helm and executive produce the Searchlight feature “Perfect.”