In a recent interview, President Barack Obama was asked about Alabama Chief Justice Roy Moore's attempt to block gay and lesbian couples from marrying in the state.

Earlier this month, Moore called on probate judges to stop issuing marriage licenses to gay couples, arguing that they have a “ministerial duty” to comply with a voter-approved constitutional amendment and a state law that define marriage as a heterosexual union despite the Supreme Court's June ruling striking down such bans.

After a couple of days, most counties resumed issuing marriage licenses to all qualified couples.

The president was interviewed Friday from the East Room of the White House by top YouTube creators Destin Sandlin, Ingrid Nilsen and Adande Thorne.

Nilsen, who came out last year, asked Obama about Moore's order.

“[Marriage equality] is here to stay,” Obama said. “Understand that the Supreme Court has ruled that under the constitution everybody in all 50 states has the right to marry the person they love. That's now the law of the land. The fact that an Alabama judge is resisting is just a temporary gesture by this judge that will be rapidly overturned. It violates the supremacy clause – when the constitution speaks, everybody has to abide by it, and state judges can't overturn it.”

On LGBT rights, Obama remarked: “The notion that you'd discriminate against someone because of sexual orientation is so out of sync with how most young people think – including young Republicans, young Democrats. … This is an issue that is going to be moving in the right direction as long as we stay vigilant and keep working on it.”