President Obama speaks to reporters in the White House briefing room on Friday. The president took questions about the amicus brief the White House filed with the US Supreme Court, which argues that California’s Proposition 8, which bans gay marriage, is unconstitutional.

Washington — President Obama on Friday said that in recent years, the whole nation has moved toward the position that gay couples should marry – a change in thinking that mirrors his own.

That’s a “positive thing,” he said at a short news conference, and it’s a big reason the administration on Thursday filed a friend-of-the-court brief with the US Supreme Court arguing that California’s Proposition 8, which bans gay marriage, is unconstitutional.

“When the Supreme Court essentially called the question by taking this case about California’s law, I didn’t feel like that was something that this administration could avoid,” Mr. Obama said. “I felt it was important for us to articulate what I believe and what this administration stands for.”

Strictly speaking, the US did not have to get involved in Hollingsworth v. Perry (12-144), the Supreme Court case on Prop. 8. That’s because the case centers on the constitutionality of a state statute: in this case, a proposition passed by California voters, which amended the state constitution to limit “marriage” to a union between a man and a woman.

The administration’s brief argues (unsurprisingly) that Prop. 8 is indeed unconstitutional. But it does not hold that all state prohibitions on gay marriage are thus also unconstitutional.

However, the brief’s reasoning still might ultimately lead the Supreme Court, if it agrees, to eventually establish gay marriage as a national right.

Got that? No? OK, we’ll back up and try a fuller explanation.

The reason Prop. 8 is unconstitutional is because California already allows gays full rights and benefits via civil unions, according to the administration brief. Thus there is no reason to deny them the final step of marriage, except simple prejudice, the brief argues. If California thought there was some substantive reason to prevent gay marriage – say, that it would be bad for children – then the state would block civil unions as well.

And if gays are being denied marriage due to prejudice, then Prop. 8 runs afoul of the Constitution’s promise that all Americans will be treated equally.

But as the US brief points out, if the Supreme Court agrees and strikes down the California statute on these grounds, that does not mean the justices will have established a nationwide right for gays to marry. What it does mean is that the eight states that allow full civil unions but prohibit gay marriage will have to take the last step and lift their own marriage bans.

“The Court can resolve this case by focusing on the particular circumstances presented by California law and the recognition it gives to committed same-sex relationships, rather than addressing the equal protection issue under circumstances not present here,” says the US brief.

That’s not the full extent of the administration’s position. The brief also argues that in the longer term, the Supreme Court should subject laws that discriminate on the basis of sexual orientation to a type of judicial review known as “heightened scrutiny.”

This rigorous test is now applied to laws that discriminate on the basis of race, sex, and a few other factors. If the high court agrees and lumps discrimination against gays in with these other categories, same-sex marriage bans around the country could be imperiled.

“But that might take a while, by which point the country and the Court might be more ready to do so – which may well have been the Obama administration’s goal all along,” writes Amy Howe on SCOTUSblog.

This complicated brief reflects Obama’s own complicated relationship with the issue. In 2008, he said he opposed California’s same-sex marriage ban, but did not go further and endorse gay marriage as an institution. In 2012, he said he was personally in favor of same-sex marriage, but that states should have leeway to control the definition of marriage within their own boundaries.

Then in his inaugural address, he seemed to indicate yet more movement.

“Our journey is not complete until our gay brothers and sisters are treated like anyone else under the law,” Obama said.

Asked on Friday why the US did not file a brief calling for a more sweeping legalization of same-sex marriage, Obama said, “That’s an argument I’ve made personally," but that Hollingsworth v. Perry deals only with the constitutionality of California law, and thus the US limited its legal reasoning in the case.