US President Barack Obama has applauded the decision of the Supreme Court that the Defense of Marriage Act is unconstitutional, phoning the people who brought the case to tell them “you guys should be very proud of today.”

“The laws of our land are catching up to the fundamental truth that millions of Americans hold in our hearts: when all Americans are treated as equal, no matter who they are or whom they love, we are all more free,” Mr Obama said.

Obama learnt about the news while on board Air Force One, during a flight to begin a week long tour of Senegal, South Africa and Tanzania.

“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,” he said.

Mr Obama said he had directed the US Attorney General to review all federal statutes to apply the decision, in particular for federal benefits.

From the plane, Mr Obama phoned plaintiffs in the case including Kris Perry and Sandy Stier who received their call while on live television. “You guys should be very proud of today,” the president told them.

Edith Windsor of New York, who was married to her partner, and who sued the government in order to get the federal estate tax deduction previously only available to straight people when their spouses die and who is now eligible for a $363,000 (£236,000) tax refund.

After several days of fraught speculation about when the court would rule, it made its announcement on Wednesday morning that Section 3 of DOMA, which defined marriage as between one man and one woman, paving the way for over 1,100 benefits, previously not afforded to same-sex couples.

The clear-cut ruling was made on the case of United States v Windsor.

It issued an opinion on the Defense of Marriage Act (DOMA), which federally defined marriage as between one man and one woman, and therefore blocked gay married couples from receiving many benefits, on Wednesday morning.

The Supreme Court voted 5-4 to deem DOMA unconstitutional, saying that it was so, because it deprived people of their Fifth Amendment freedoms.

The opinion read: “DOMA singles out a class of persons deemed by a State entitled to recognition and protection to enhance their own liberty.”

The full opinion is available to read on the SCOTUS website.

Nine US states, and Washington DC currently allow equal marriage, and it will become law in Rhode Island, Delaware and Minnesota in the summer.

The US state of Maryland in November 2012 became the first state to legalise equal marriage by means of a popular vote back in 2012. The law came into effect on 1 January 2013.

Washington and Maine also legalised equal marriage in referendums in those states on the same day.