Gay rights activists need to be vigilant to maintain their pace of progress, President Barack Obama said at a White House LGBT reception.
An "LGBT Pride" event has been held annually at the White House during the Obama administration. Leading figures in the gay, lesbian, bisexual and transgender movement attended Thursday's event.
In addressing the attendees, Obama said changing attitudes in the country are advancing faster than laws.
"You know, when you talk to the upcoming generation, our kids — Malia, Sasha's generation — they instinctively know that people are people, and families are families," he said. "Discrimination, it's so last century. It doesn't make sense to them."
"Change can be slow, and I know that there have been times where at least some of the people in this room have yelled at me," he said. "But together, we've proven that change is possible, that progress is possible. It's not inevitable, though. History doesn't just travel forward; it can go backwards if we don't work hard. So we can't be complacent."
It was not until the fourth year of Obama's administration that he announced his support of same-sex marriage.
In his campaign for the U.S. Senate seat in Illinois in 2004, he told a reporter that he did not support same-sex marriage, saying the word marriage has "strong religious roots."
In 2012, he officially changed his position, telling ABC News, "I've been through an evolution on this issue."