The 2016 “Ghostbusters” remake has become a subject of racial controversy after the film’s first trailer premiered last week, featuring Leslie Jones, the only African-American female lead, as a subway worker while the other three Caucasian leads play scientists.

Paul Feig revealed that Jones’ role, however, was originally written for Melissa McCarthy.

“When Katie (Dippold, co-writer) and I wrote the script, we had written the role with Melissa in mind,” Feig said in an interview with Empire. “But then I thought, I’ve seen Melissa play a brash, larger than life character.”

Feig added of Jones,”She’s one of my favorite people on the planet. I don’t normally like comedy that’s big and loud, but she is able to pull that off in a way that feels real and it’s her.”

The director told Empire he prefers finding the funniest people he knows and finding the funniest thing about them when casting for films. Fieg said he believed the role of Patty would allow Jones to shine comedically.

“I wanted to unleash Leslie on the public in the same way we unleashed Melissa on the public in ‘Bridesmaids,’ with a very showy role,” Feig said.

erupted in criticism after the trailer dropped, accusing the film of perpetuating racial stereotypes — and as a result pushing Jones to contemplate leaving the social media site.

That’s when Feig stepped in.

“Haters, attack me all you want but when you attack and insult my cast, you’ve crossed the line,” Feig tweeted. “Grow up and leave my cast alone.”

And haters, attack me all you want but when you attack and insult my cast, you've crossed the line. Grow up and leave my cast alone. — Paul Feig (@paulfeig) March 8, 2016

The film’s trailer brought in 24 million views in 24 hours, topping “Independence Day: Resurgence” and “The Legend of Tarzan” in opening day trailer views.

“Ghostbusters” bows July 15.