Image copyright Reuters Image caption The White House lit up after the Supreme Court ruled gay marriage was legal

"It's easy to forget now, when we've come so far... just how much courage was required for Ellen to come out on the most public of stages almost 20 years ago."

That's how President Barack Obama introduced comedian and talk show host, Ellen DeGeneres, before awarding her the Presidential Medal of Freedom on Tuesday.

He said her bravery in coming out as gay helped "push our country in the direction of justice".

DeGeneres came out in 1997 at a time when gay rights had not made such great strides.

Civil partners were not eligible for benefits, same-sex marriage was illegal and sodomy laws were in place in several states.

So what did DeGeneres do? What cultural and political events have happened to change American attitudes towards the gay community?

Milestone 1: Ellen DeGeneres, 1997

Image copyright AP

Ms DeGeneres came out in 1997 on her self-titled series "Ellen", aired on ABC in an episode entitled The Puppy Show.

The move generated uproar, causing advertisers like US department store JCPenney and car manufacturer Chrysler to turn down advertising slots on the programme. Ms DeGeneres even received a death threat.

Months later, ABC put a parental advisory on the show after a kiss between two female characters was shown on air. The following year the show was cancelled after running for five seasons.

Milestone 2: Goodridge vs Department of Public Health, 2004

Image copyright Getty Images Image caption Hillary and Julie Goodridge are now divorced

A Massachusetts court ruled gay marriage was legal in the Goodridge vs Department of Public Health court case. It was the first decision by a US court which found same-sex couples had the right to wed.

Julie and Hillary Goodridge who acted as lead plaintiffs in the case, were speedily married, along with several other couples.

The same day President George W Bush repeated his call to Congress to amend the US Constitution defining marriage "as a union of a man and a woman".

Milestone 3: "Brokeback Mountain", 2005

Image copyright AP Image caption The director and actors in Brokeback Mountain

The hit Hollywood film, Brokeback Mountain, was released, breaking major taboos by telling the story of two male lovers in the American West.

Critics hailed the film which was nominated for eight Golden Globe awards, winning three.

But some critics accused the Oscars of homophobia when the film lost out to Crash. Brokeback Mountain did win three Academy Awards, including one for director Ang Lee.

Some film experts suggested the success of Brokeback Mountain was due to its broad appeal - instead of focusing on the fight for gay rights, the story was more human, centring around two lovers.

Milestone 4: "Don't Ask, Don't Tell", 2011

Image copyright AP Image caption Defence Secretary Robert Gates urged Congress to repeal the ban but said careful planning was needed

A ban on openly gay men and lesbians serving in the military, first introduced in 1993, was repealed under President Obama.

The act meant service members could reveal they were gay without fear of investigation or being discharged.

It also allowed service members who had been previously discharged under the ban to re-enlist.

Milestone 5: Gay marriage legal, 2015

Image caption The ruling ended decades of bitter legal battles

The US Supreme Court ruled that same-sex marriage was a legal right across the United States.

The decision meant that the 14 states with bans on same-sex marriage were no longer be able to enforce them.

Couples lined up in courthouses minutes after the ruling to tie the knot. President Obama said the decision was a "victory for America".

"When all Americans are treated as equal, we are all more free " he said.