NEW YORK (AP) — Just two days after being named host of the Academy Awards, Kevin Hart stepped down following an outcry over past homophobic tweets by the comedian.

Capping a swift and dramatic fallout, Hart wrote on Twitter just after midnight Thursday that he was withdrawing as Oscars host because he didn't want to be a distraction. "I sincerely apologize to the LGBTQ community for my insensitive words from my past," wrote Hart.

Hart, who is in Australia for a comedy tour, also tweeted Friday morning: "The ultimate measure of a man is not where he stands in moments of comfort and convenience, but where he stands at times of challenge and controversy. Martin Luther King, Jr."

Earlier Thursday evening, the comedian had refused to apologize for tweets that resurfaced after he was announced as Oscars host on Tuesday. In a video on Instagram, Hart said the Academy of Motion Pictures Arts and Sciences gave him an ultimatum: apologize or "we're going to have to move on and find another host."

"I chose to pass on the apology," Hart said. "The reason why I passed is because I've addressed this several times."

The film academy didn't respond to messages Thursday evening.

Hart has since deleted some of the anti-gay tweets, mostly dated from 2009-2011. But they had already been screen-captured and been shared online. In 2011, he wrote in a since-deleted tweet: "Yo if my son comes home & try's 2 play with my daughters doll house I'm going 2 break it over his head & say n my voice 'stop that's gay.'"

In an earlier post Thursday, Hart wrote on Instagram that critics should "stop being negative" about his earlier anti-gay remarks.

"I'm almost 40 years old. If you don't believe that people change, grow, evolve? I don't know what to tell you," said Hart, who added, in all-caps: "I love everybody."

Hart's attitudes about homosexuality were also a well-known part of his stand-up act. In the 2010 special "Seriously Funny," he said "one of my biggest fears is my son growing up and being gay."

Story continues

"Keep in mind, I'm not homophobic, I have nothing against gay people, do what you want to do, but me, being a heterosexual male, if I can prevent my son from being gay, I will," Hart said.

GLAAD, the advocacy group for LGBTQ rights, said Thursday that it reached out to Oscars broadcaster ABC, the Academy of Motion Pictures Arts and Sciences, and Hart's management to "discuss Kevin's anti-LGBTQ rhetoric and record."

Comedian and actor Billy Eichner said "a simple, authentic apology showing any bit of understanding or remorse would have been so simple."

It's not the first time an Oscars host has been derailed by anti-gay remarks. Ahead of the 2012 Academy Awards, producer Brett Ratner, who had been paired with host Eddie Murphy, resigned days after using a gay slur at a film screening. Murphy soon after exited, as well.

That year, a tried-and-true Oscars veteran — Billy Crystal — jumped in to save the show, hosting for his eighth time. This time, speculation has already been rampant that few in Hollywood want the gig, for which few win glowing reviews.

The film academy moved up this year's ceremony to Feb. 24, giving producers little time to find a replacement.

At a Hollywood event Thursday night, comedian Kathy Griffin, whose career suffered last year when she posted a photo on social media that looked like a beheaded President Donald Trump, said Hart messed up, yet had empathy for the situation.

"He wrote that tweet eight years ago when gay marriage wasn't even legal yet, so we all do things. God knows in my 23 specials I've said heinously inappropriate things," she said.

Griffin hoped Hart's departure would open the door for a woman comedian to host the show.

"I want more women to host the Oscars and in the entire history of the Oscars, they've only been hosted by three women, three times and so we haven't leveled the playing field yet," she said.

Terry Crews, who described Hart as a "brother," said he respected Hart's decision to walk away from the show.

"I'm thankful that he acknowledged things that maybe weren't right, and he'll come back from this," Crews said. "We do have to admit our guilt and say, 'Hey I messed up and let's fix this thing.' I think that he will do that, and he has always done that."

___

Associated Press writer Marcela Isaza contributed to this report.