Updated

President Obama on Wednesday hailed the two Supreme Court decisions on gay marriage, telephoning the plaintiffs in one and issuing a statement saying the court has "righted" a wrong in the other.

The president, while flying to Africa aboard Air Force One, called the plaintiffs in the challenge to California's gay marriage ban. The court did not rule on the merits of the ban in that ruling, but effectively allowed same-sex marriages to resume in the state.

Separately, Obama applauded a broader ruling that struck down a Defense of Marriage Act provision that denied federal benefits to married gay couples.

"This was discrimination enshrined in law. It treated loving, committed gay and lesbian couples as a separate and lesser class of people. The Supreme Court has righted that wrong, and our country is better off for it," Obama said.

He said he's directed Attorney General Eric Holder to work with the Cabinet to review all federal statutes to make sure benefits are made available under the ruling.