President Barack Obama hailed the Supreme Court's decision to strike down a key provision of the Defense of Marriage Act on Wednesday, declaring the court "has righted a wrong, and our country is better off for it," AP reports. Obama decided in 2011 to stop defending the 1996 law, concluding that it was legally indefensible. In a statement issued while he was flying on Air Force One to Africa Wednesday, Obama said he had directed Attorney General Eric Holder to work with others in his administration to make sure federal law reflects the court's decision. "This was discrimination enshrined in law," he said. "We are a people who declared that we are all created equal -- and the love we commit to one another must be equal as well." The court invalidated a part of the law defining marriage as the union of a man and a woman. Acknowledging that many Americans object to gay marriage on religious grounds, he stressed that nothing in the decision changes how religious institutions define and consecrate marriage. His statement came moments after he telephoned his congratulations to gay rights advocate Chad Griffin and plaintiffs in a California gay marriage case. "Through your courage, you're helping out a whole lot of people," Obama told them. Obama put Griffin and the plaintiffs' legal team on speaker phone told and told them that "today's ruling is a victory," even if the high court did not directly address the constitutionality of Proposition 8.