Phil Lord and Chris Miller’s reputation for writing irreverent, poppy films such as “21 Jump Street” and “The Lego Movie” helped the white-hot writing and directing duo land one of the most coveted gigs in Hollywood — a chance to call the shots on a “Star Wars” film.

But their chance to put their stamp on a galaxy far, far away collapsed on Tuesday with the stunning announcement that the pair would be departing the still untitled Han Solo spin-off movie in the midst of production. Their exit comes after months of conflict with producer Kathleen Kennedy, others from her LucasFilm team, and co-writer and executive producer Lawrence Kasdan, and the two directors hired to infuse the “Star Wars” universe with a tongue-in-cheek sensibility.

Miller and Lord were stunned to find that they were not being granted freedom to run the production in the manner that they were accustomed to. They balked at Kennedy’s tight control on the set.

A person with knowledge of the production said that the chemistry between the directors and Kennedy was never right.

“It was a culture clash from day one,” the source said. “She didn’t even like the way they folded their socks.”

The source said that while Lord and Miller were supposedly hired for their vision and distinctive brand of filmmaking when it came to the “Star Wars” production, Kennedy did not approve of their shooting style and process of interacting with actors and crew. “They weren’t given the leeway to do what they had to do,” the source said.

The duo also clashed with Kasdan, who has been an integral creative part of several “Star Wars” movies, dating back the the 1980 “The Empire Strikes Back.” Like Kennedy, he questioned many of the pair’s directing choices.

“Kathy, her team and Larry Kasdan have been doing it their way for a very long time. They know how the cheese is made and that’s how they want it made,” said the source. “It became a very polarizing set.”

In statements accompanying news of the directing shakeup, both Kennedy and Lord and Miller alluded to differing visions for the project.

“Unfortunately, our vision and process weren’t aligned with our partners on this project. We normally aren’t fans of the phrase ‘creative differences’ but for once this cliché is true. We are really proud of the amazing and world-class work of our cast and crew,” said Lord and Miller in a statement.

Kennedy promised a new director would be announced shortly. Sources say Ron Howard is in talks to take over the film, but there is no deal as yet.

Ron Howard declined to discuss the prospect of his taking over the movie in a conference call with reporters Wednesday to unveil plans for the second season of his National Geographic TV series “Genius.”

It is unclear if and how Lord and Miller will be credited on the movie. Hollywood insiders said their forced departure in the middle of filming was a highly unusual situation.

Kennedy said in a statement, “Phil Lord and Christopher Miller are talented filmmakers who have assembled an incredible cast and crew, but it’s become clear that we had different creative visions on this film, and we’ve decided to part ways.”

The directors did not leave the production voluntarily, but were fired by LucasFilm. The decision comes as the Han Solo film still has several weeks left to shoot, according to another individual with knowledge of the production. An additional several weeks of reshoots have been planned to take place later this summer.

It’s not clear who will take over directing duties from Lord and Miller. Tony Gilroy (“Michael Clayton”) oversaw some of the reshoots for “Rogue One: A Star Wars Story.” However, he will not be directing the Han Solo film, according to his spokesperson.

Kennedy had her own ideas about how the film should be shot. In an interview with Variety last year, she said she wanted the film to have “…a heist or Western type feel,” adding, “We’ve talked about [Frederic] Remington and those primary colors that are used in his paintings defining the look and feel of the film.”

Some insiders believe that while Kennedy wants to make a splash by hiring young indie directors such as Gareth Edwards (“Rogue One: A Star Wars Story”) and Rian Johnson (“Star Wars: The Last Jedi”), she’s ultimately unwilling to empower them to make their own creative decisions.

Unlike Edwards and Johnson, Miller and Lord felt they had earned their stripes, having worked extensively in the major studio system.

The Han Solo film will focus on the Millennium Falcon pilot’s early days as a smuggler. The film stars Alden Ehrenreich in the role Harrison Ford made famous. The cast includes Donald Glover, Thandie Newton, Woody Harrelson, Michael K. Williams, and Emilia Clarke.

A spokesperson for Disney declined comment, other than to say that the Han Solo standalone remains slated for a May 25, 2018, release date. Lord and Miller’s reps also declined comment.

Ricardo Lopez contributed to this article.