Comedian Kevin Hart has stepped down as host of the 2019 Academy Awards amid controversy over alleged homophobic tweets he posted nearly a decade ago.

The US comedian and actor was named as the host of the Oscars on Tuesday, describing the role as “the opportunity of a lifetime”.

Shortly after his appointment, tweets resurfaced, originally posted between 2009 and 2011, which contained offensive language towards the LGBT community.

READ MORE: US superstar Kevin Hart visits American-themed bar in Glasgow

One tweet, from 2011, is alleged to have said: “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’.”

Amid a growing controversy and after refusing the Academy’s request to apologise, Hart announced on Twitter he was stepping aside.

He said: “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.

READ MORE: Comedian Kevin Hart thanks Glasgow fans following first-ever show in city

“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.”

Hours before announcing his decision, Hart, who is on tour in Australia, shared two videos to Instagram. In the first one he was dismissive of the controversy, saying he had had time to “grow” in the years since sharing the offensive tweets.

In another Instagram video several hours later, he revealed the Academy had been in touch asking him to say sorry, but he refused as he has already addressed it.

He said: “I chose to pass, I passed on the apology. The reason why I passed is because I’ve addressed this several times. This is not the first time this has come up. I’ve addressed it, I’ve spoken on it. I’ve said where the rights and wrongs were.

“I’ve said who I am now versus who I was then. I’ve done it, I’ve done it. I’m not going to continue to go back and tap into the days of old. I’ve moved on, I’m in a completely different space in my life.

“The same energy that went into finding those old tweets could be the same energy put into finding the response to the questions that have been asked years after years after years.

“We feed internet trolls and reward them. I’m not going to do it, man. I’m going to be me, and I’m going to stand my ground.”

Kevin HartKevin Hart has stepped down as host of the Oscars (Isabel Infantes/PA)

Hart added: “Regardless, to the Academy, I’m thankful and appreciative of the opportunity. If it goes away, no harm, no foul.”

The Academy did not immediately respond to requests for comment.

Hart’s decision to quit will leave all eyes on who the Academy approach to replace him.

Shortly before his doomed unveiling on Tuesday, respected trade publication The Hollywood Reporter called the host’s gig, “the worst job in town”, after previous appointments experienced difficulties on the night.

Jimmy Kimmel was the MC when the best picture gong was wrongly handed to La La Land over Moonlight, though was not responsible for that mistake.

Hart would have been just one of a handful of African Americans to host the Oscars, following on from stars including Chris Rock, Whoopi Goldberg and Sammy Davis Jr.

The Oscars will take place in Los Angeles on Sunday February 24.