“Gods of Egypt” director Alex Proyas and the film’s studio, Lionsgate, have issued apologies for the lack of diverse casting in the mythological action film, which has generated controversy for its predominantly white cast.

Movie, #GodsOfEgypt in which everyone is white? Egyptians, in history and today, have NEVER been white. BRING BACK GEOGRAPHY!! It's Africa! — Bette Midler (@BetteMidler) November 12, 2015

Why does the Egyptian extras from #GodsOfEgypt look like they're from a Seth Rogen movie? pic.twitter.com/y4Rm4eyjYA — BlackGirlNerds (@BlackGirlNerds) November 12, 2015

Proyas issued a statement apologizing for the lack of racial diversity in the cast on Friday. “The process of casting a movie has many complicated variables, but it is clear that our casting choices should have been more diverse. I sincerely apologize to those who are offended by the decisions we made.”

Lionsgate also acknowledged the need for more inclusive casting in a statement obtained by Variety, which reads: “We recognize that it is our responsibility to help ensure that casting decisions reflect the diversity and culture of the time periods portrayed. In this instance we failed to live up to our own standards of sensitivity and diversity, for which we sincerely apologize. Lionsgate is deeply committed to making films that reflect the diversity of our audiences. We have, can and will continue to do better.​​”

The public apology stands in contrast to Ridley Scott’s response over a similar controversy prompted by the casting for his Egypt-set epic, “Exodus: Gods and Kings,” which was banned in Egypt for its “historical inaccuracies” last year.

Scott defended his decision to cast white actors Christian Bale and Joel Edgerton in the lead roles of Moses and Ramses as a matter of practicality. “I can’t mount a film of this budget, where I have to rely on tax rebates in Spain, and say that my lead actor is Mohammad so-and-so from such-and-such,” Scott told Variety before the film’s release. “I’m just not going to get it financed. So the question doesn’t even come up.”

21st Century Fox CEO Rupert Murdoch, who owns the studio behind “Exodus,” then poured fuel on the fire when he weighed in on the furor via Twitter, writing, “Moses film attacked on Twitter for all white cast. Since when are Egyptians not white? All I know are.”

The cast of “Gods of Egypt” includes Gerard Butler, Nikolaj Coster-Waldau, Brenton Thwaites, Chadwick Boseman, Geoffrey Rush, Elodie Yung and Courtney Eaton.

“Gods of Egypt” bows in theaters on Feb. 26, watch the trailer here.

Lionsgate and Proyas’ statements were first reported by Forbes.