President Obama predicted the Supreme Court will "shift" on same-sex marriage when it interview with Buzzfeed News. "It's time to recognize that, under the equal protection clause of the United States, same-sex couples should have the same rights as anybody else."

Mr. Obama was weighing in on the court's recent refusal to block same-sex marriages in Alabama after a federal court order determined its statutory and constitutional bans on such unions were unconstitutional. In a rare public spat between the members of the court, Justice Clarence Thomas wrote a stinging dissent to the order saying that the courtwas inappropriately signaling that it intended to rule in favor of the constitutionality of same-sex marriage when it hears the case this spring.

Alabama Chief Justice Roy Moore made an 11th-hour attempt to keep the weddings on hold, with an order sent to all probate judges Sunday night directing them to refuse to issue the licenses, but some judges began issuing wedding licenses to same-sex couples after the court's order.

Get Breaking News Delivered to Your Inbox

"I think that the courts at the federal level will have something to say to him," Mr. Obama said.

Regarding his own personal feelings on the issue, Mr. Obama said he never personally believed same-sex couples should not enjoy the same legal rights as opposite-sex couples and that his so-called evolution on the issue had more to do with calling for marriage equality rather than merely backing civil unions for same-sex couples.

"You know, these are the kinds of things you learn as you... move forward in public life: that sometimes you can't split the difference. That sometimes you just have to be very clear that this is what's right. And what I'm very proud of is to see how rapidly the country has shifted and maybe the small part that I've played, but certainly my Justice Department and others have played, in this administration in getting to where we need to be," he said.

In his new memoir, "Believer: My Forty Years in Politics," former Obama chief strategist David Axelrod wrote that Mr. Obama intentionally concealed his support for same-sex marriage during his 2008 campaign for political gain.

On that matter, Mr. Obama said, "I think David is mixing up my personal feelings with my position on the issue." At one time, he said, he believed that backing civil unions was "a sufficient way of squaring the circle," on the issue. He did notpublicly back same-sex marriage until 2012.

In an earlier part of the interview that was released Tuesday evening, Mr. Obama revealed that Kayla Jean Mueller, the 26-year-old American woman held by Islamic State of Iraq and Syria (ISIS) militants who was confirmed dead Tuesday, was among the hostages the U.S. sought to rescue in a secret mission that failed in the summer of 2014.

"I deployed an entire operation -- at significant risk -- to rescue not only her but the other individuals who had been held, and probably missed them by a day or two," the president said.

He also said telling the families of the hostages that the U.S. will not pay ransoms is "as tough as anything I do."

During the interview, Mr. Obama weighed in on health care, too, condemning large corporations that cut their employees' hours to avoid paying healthcare costs.

"It's one thing when you've got a mom-and-pop store who can't afford to provide paid sick leave or health insurance or minimum wage to workers, even though a large percentage of those small businesses do it because they know it's the right thing to do," Mr. Obama said. "But when I hear large corporations that make billions of dollars in profits trying to blame our interest in providing health insurance as an excuse for cutting back workers' wages, shame on them."

The House recently passed a bill that changes the definition of a "full-time" worker under the Affordable Care Act, from one who works at least 30 hours a week to one who works at least 40 hours a week. That change would impact a provision in the law called the "employer mandate," which requires businesses with at least 50 full-time employees to provide their workers with insurance. The Senate has yet to take up the bill, which the president has promised to veto.