Comedian Kevin Hart has announced he is stepping down from hosting the 2019 Academy Awards amid criticism over years-old tweets deemed anti-gay.

Hart, 39, posted on Twitter early Friday an apology to the LGBTQ community for his past comments.

“I have made the choice to step down from hosting this year's Oscar's....this is because I do not want to be a distraction on a night that should be celebrated by so many amazing talented artists. I sincerely apologize to the LGBTQ community for my insensitive words from my past,” Hart tweeted.

In a follow-up tweet he added, "I'm sorry that I hurt people.. I am evolving and want to continue to do so. My goal is to bring people together not tear us apart. Much love & appreciation to the Academy. I hope we can meet again."

The announcement came two days after Hart announced on his Instagram account that he’d been selected to host the 91st Academy Awards, which will be broadcast Feb. 24. He was slated to take over the hosting duties from Jimmy Kimmel, who emceed the past two ceremonies.

Shortly after announcing the hosting gig, several now-deleted tweets by Hart using words such as “homo” and “gay,” dating back to 2011, resurfaced.

In a 2010 stand-up special, Hart said "If I can prevent my son from being gay, I will."

GLAAD, a media monitoring group founded by LGBT people in media, said it had contacted the Academy of Motion Picture Arts and Sciences to discuss Hart’s gig prior to him stepping down.

"We’ve reached out to @ABCNetwork, @TheAcademy and @KevinHart4real’s management to discuss Kevin’s anti-LGBTQ rhetoric and record as well as opportunities for positive LGBTQ inclusion on the Oscars stage," the group tweeted.

Late Thursday, Hart reacted to the backlash in an Instagram video.

"If u want to search my history or past and anger yourselves with what u find that is fine with me, a shirtless Hart said. "I’m almost 40 years old and I’m in love with the man that I am becoming.  "If you want to hold people in a position where they always have to justify or explain their past then...I'm the wrong guy, man."

Some Twitter users, including celebrities, were not amused.

Chad Griffin, president of Human Rights Campaign, which advocates for LGBTQ equality, also chimed in.

In another Instagram video, Hart said the Academy asked him to apologize for the past tweets or "we're going to have to move on to find another host."

"I chose to pass," Hart said. "The reason I passed because I've addressed this several times. I've said where the rights and wrongs were. I've who I am now versus who I was then."

"We feed into the Internet trolls and we reward them, I'm not going to do it, man. I'm going to be me, and stand my ground," he continued.

The Associated Press contributed to this report.