Outrunning giant sandworms is nothing compared to taming Timothée Chalamet’s mutinous mane.

Making sci-fi epic “Dune” (in theaters and streaming on HBO Max Thursday), filmmaker Denis Villeneuve  has joked that he had to direct both the eager young actor and his famously tousled hair.

Shooting in the deserts of Jordan and the United Arab Emirates, “we’d just get unlucky with the wind sometimes,” Chalamet recalls with a laugh. “But I don’t think he ever held it against me.”

“Dune” is Chalamet’s first time leading a big-budget studio movie, after critically acclaimed turns in “Little Women,” “Beautiful Boy” and “Call Me By Your Name,” the latter of which earned him a best actor Oscar nomination in 2018.

Based on Frank Herbert’s influential 1965 novel, “Dune” follows a sensitive space prince named Paul Atreides (Chalamet), whose dad (Oscar Isaac) is caught in a war over the deadly planet Arrakis, which is abundant in a precious resource known as Spice.