Director Brett Ratner has stepped down as producer of this year's upcoming Academy Awards after using an anti-gay slur.

Ratner, the director of the upcoming movie Tower Heist, said during a Q&A following a recent screening of his film that “rehearsing is for fags.”

In an open letter to the Hollywood community released late Tuesday, the 42-year-old Ratner reiterated an earlier apology and resigned as producer of the 84th annual Academy Awards.

“Over the last few days, I've gotten a well-deserved earful from many of the people I admire in this industry expressing their outrage and disappointment over the hurtful and stupid things I said in a number of recent media appearances. To them, and to everyone I've hurt and offended, I'd like to apologize publicly and unreservedly,” Ratner wrote.

“So many artists and craftspeople in our business are members of the LGBT community, and it pains me deeply that I may have hurt them. I should have known this all along, but at least I know it now: words do matter. Having love in your heart doesn't count for much if what comes out of your mouth is ugly and bigoted.”

The Gay & Lesbian Alliance Against Defamation (GLAAD) had called Ratner's initial apology “insufficient.”