WASHINGTON — The Obama administration asked the Supreme Court Thursday to declare that it was unconstitutional for California to pass an amendment in 2008 excluding same-sex couples from marriage — a dramatic turnaround from just four years ago, when the White House defended the federal law that bans recognition of such marriages.

"California law provides to same-sex couples registered as domestic partners all the legal incidents of marriage, but it nonetheless denies them the designation of marriage allowed to their opposite-sex counterparts. Particularly in those circumstances, the exclusion of gay and lesbian couples from marriage does not substantially further any important governmental interest. Proposition 8 thus violates equal protection," Solicitor General Donald Verrilli Jr. wrote for the administration.

The administration's new stance is outlined in a brief filed to the Supreme Court in the challenge to California's Proposition 8. While it stops short of calling on the court to declare a nationwide end to bans on marriage for same-sex couples, it calls for the court to strike down Proposition 8 — the only issue directly before the court — and sets up a strong argument against other bans.

The filing comes on the last day the court is accepting amicus curiae, or friend of the court, briefs in the case that was brought in 2009 by the American Foundation for Equal Rights. Although the administration has told the court that it should hold the Defense of Marriage Act's federal definition of marriage as unconstitutional, it had not taken a position until Thursday on whether California could deny same-sex couples the right to marry.

In a statement, Attorney General Eric Holder said, "In our filing today in Hollingsworth v. Perry, the government seeks to vindicate the defining constitutional ideal of equal treatment under the law. Throughout history, we have seen the unjust consequences of decisions and policies rooted in discrimination. The issues before the Supreme Court in this case and the Defense of Marriage Act case are not just important to the tens of thousands Americans who are being denied equal benefits and rights under our laws, but to our Nation as a whole."

The position is another long step forward in President Obama's long evolution on LGBT rights.

In 1996, when he was running for the state Senate in Illinois, Obama told Chicagoans in the Outlines newspaper, "I favor legalizing same-sex marriages, and would fight efforts to prohibit such marriages." When running for U.S. Senate and later for president, however, he had stepped back, supporting civil unions but not full marriage rights for same-sex couples.

Once elected president, his administration defended the Defense of Marriage Act in court, first vigorously — with language and arguments that led LGBT advocates to protest outside the White House — and later with a more scaled-back defense.

On February 23, 2011, however, Attorney General Eric Holder told House Speaker John Boehner that he and Obama had concluded that Section 3 of DOMA, the provision that prohibits the federal government from recognizing same-sex couples' marriages, is unconstitutional, and the administration began opposing the law in court.

The most significant element of the administration's move at that time was the broad decision, under constitutional guarantees of equal protection, that laws classifying people based on sexual orientation should be subjected to a closer scrutiny by courts. Heightened scrutiny, as it is called, is what courts use to examine laws that classify people based on race, religion or sex. Since DOMA classifies people based on sexual orientation, the administration argued, the law should be found unconstitutional.

It wasn't until more than a year later, on May 9, 2012, that Obama announced his personal support for marriage equality, telling ABC's Robin Roberts, "I think same-sex couples should be able to get married." Since then, however, Obama had been silent on whether he believed the Constitution required that states allow same-sex couples to marry.

Although Thursday's filing only addresses the specifics of the Proposition 8 case, it applies that heightened scrutiny standard to the amendment and determines that, under that standard, it should be found unconstitutional. It also notes that "California is not alone in this regard. Seven other states provide, through comprehensive domestic partnership or civil union laws, same-sex couples rights substantially similar to those available to married couples, yet still restrict marriage to opposite-sex couples: Delaware, Hawaii, Illinois, Nevada, New Jersey, Oregon, and Rhode Island."

The brief filed in Hollingsworth v. Perry is signed by Solicitor General Donald Verrilli, the administration's lawyer before the Supreme Court, but it was prepared in consultation with the White House. This past week, Obama noted he had to be careful not to "interjecting [him]self too much into this process."

Thursday's filing lays out the constitutional argument that advocates of marriage equality, including Ted Olson and David Boies, who are representing the couples challenging Proposition 8, have been arguing for years.

The filing does not go so far as to say that the Constitution requires all states to allow same-sex couples to marry — something that LGBT advocates had been seeking but that does not necessarily need to be resolved by the court in this case — but it does utilize much of the same reasoning that such a decision would entail.

The Supreme Court is slated to hear oral arguments in the Proposition 8 challenge on March 26 and in the DOMA challenge the next day, March 27. Although the administration wasn't scheduled to participate in the arguments in the Proposition 8 case, Thursday's filing could change that.

Chris Geidner is the legal editor for BuzzFeed News and is based in Washington, DC. In 2014, Geidner won the National Lesbian & Gay Journalists Association award for journalist of the year.