South Africa's highest court has ruled that gay people can inherit the property of their partners who die without a will.
The Constitutional Court said existing succession laws discriminated against same-sex couples.
The court said that whenever the word "spouse" was mentioned in the laws, the words "or partner in a same-sex life partnership" should be added.
South Africa's parliament last week legalised gay weddings.
The law is expected to come into effect on 1 December, making South Africa the first country in Africa to legalise same-sex unions.
Gay rights groups have welcomed the ruling on property rights.
The parliamentary vote on gay weddings followed a Constitutional Court ruling last year that same-sex couples should be allowed to get married.
The change was strongly opposed by some religious groups and traditional leaders.
South Africa has one of the world's most liberal constitutions - it was the first to outlaw discrimination based on sexual orientation.