WASHINGTON (AP) — The Supreme Court ruled Wednesday that legally married same-sex couples should get the same federal benefits as heterosexual couples.

The court invalidated a provision of the federal Defense of Marriage Act that has prevented married gay couples from receiving a range of tax, health and retirement benefits that are generally available to married people. The vote was 5-4.