President Barack Obama on Tuesday predicted that the Supreme Court will strike down state marriage bans later this year.

In comments to BuzzFeed News, the president also weighed in on the legal wrangling taking place in Alabama after its chief justice ordered state judges to defy a federal judge's rulings declaring the state's ban on gay marriage unconstitutional.

“My sense is that the Supreme Court is about to make a shift, one that I welcome, which is to recognize that – having hit a critical mass of states that have recognized same-sex marriage – it doesn't make sense for us to now have this patchwork system,” Obama said.

“It's time to recognize that under the equal protection clause of the United States [Constitution], same-sex couples should have the same rights as anybody else.”

On the attempt to block marriage equality in Alabama, Obama stated that the law was clear.

“[W]e have a supremacy clause in our Constitution,” he said. “When federal law is in conflict with state law, federal law wins out.”

(Related: Obama supported gay marriage before 2008, David Axelrod claims.)