President Obama's administration for the first time urged the U.S. Supreme Court to legalize gay marriage nationwide, throwing its weight behind same-sex couples seeking a historic civil rights ruling.

Obama's top courtroom lawyer, U.S. Solicitor General Donald Verrilli, told the justices Friday that state bans on gay marriage "send the inescapable message that same-sex couples and their children are second-class families."

The filing sets up the administration to argue alongside gay-rights advocates when the nine justices hear arguments on April 28. The court is likely to rule in late June.

The administration's brief completes a shift on the issue for Obama, who ran for president in 2008 as a supporter of civil unions for gay couples, but not marriage.

Even after Obama backed gay marriage publicly in 2012, his administration took a more nuanced view in court. When the Supreme Court considered the issue in 2013, the administration stopped short of urging nationwide legalization, instead taking a position that would have added eight new gay-marriage states.

Gay couples can now marry in more than two-thirds of the country, largely because of court rulings that have overturned bans. The high court showdown involves couples from Ohio, Michigan, Kentucky and Tennessee.

The administration's 36-page brief takes a somewhat different tack from those couples. Unlike the suing couples, the Obama administration doesn't make the case that the states lack any "rational basis" for restricting marriage to heterosexual unions.

Verrilli contended that laws discriminating against gays should be given "heightened scrutiny," a standard the court has previously used to protect women and racial minorities.

"A state should be required to present an especially strong justification for a law that excludes a long-disadvantaged class of persons from an institution of such paramount personal, societal and practical importance," Verrilli argued.

The administration's filing is among more than 70 pro-marriage briefs.

The filings include a brief by more than 300 self-described conservatives, libertarians and moderates. The group includes billionaire energy executive David Koch, one of two brothers whose network of groups has spent hundreds of millions of dollars in support of Republican candidates. Hundreds of companies — among them, Goldman Sachs Group Inc., Google Inc. and Walt Disney Co. — are also supporting gay marriage. They signed a brief alongside sports franchises that include the San Francisco Giants and the New England Patriots.

Mayors join the case

St. Paul Mayor Chris Coleman and Minneapolis Mayor Betsy Hodges joined 224 mayors in signing onto the brief in support of gay marriage. "Saint Paul is proud of its long history of fighting for civil and human rights for all people," said Coleman in a statement. "We share in this responsibility to move our country forward and to stand up for the right of caring, mature adults to love whomever they want, and to display that love through marriage."

Hodges added: "We have made a lot of progress here in Minnesota when it comes to recognizing the freedom to marry for all couples, but we're not there yet."