The government on Thursday put a damper on the Constitutional Court's decision to grant the foreign partners of gay people the same citizenship rights as heterosexual married couples, saying the ruling did not apply retrospectively.
The government also warned that the ruling had set down specific criteria that gay couples would have to meet.
Home Affairs deputy minister Lindiwe Sisulu said the government welcomed the court's view that the judgment was not final.
"The court also recognises that the legislature is empowered to amend or fine-tune any extension that the court, through its order, might make to the Aliens Control Act," Sisulu said.
She added that the department would "follow strict criteria in preventing the abuse of its immigration laws".
The ministry, which opposed the application by six couples, the Commission on Gender Equality and the National Coalition for Gay and Lesbian Equality, was ordered to pay all the costs.
Yesterday's ruling was welcomed by gay rights campaigners, who described it as "important in the recognition of gay and lesbian relationships".
Reading extracts from the unanimous judgment, Mr Justice Laurie Ackermann said the law as it currently stood encouraged homophobia.
"The rights of equality and dignity were found to be closely related in the present case and it was held that the section reinforced stereotypes of gays and lesbians.
"This conveyed the message that gays and lesbians lack the inherent humanity to have their families and family lives in such same-sex relationships respected or protected, and constituted an invasion of their privacy," he said.
The court ruled that the Department of Home Affairs has been acting unconstitutionally because it discriminated on grounds of sexual orientation.
The court ruled that instead of overhauling the section of the law which currently recognises only heterosexual unions, it should be reworded to include "or partner in a permanent same-sex life partnership".
The court defined permanent life partners as "ones who have an established intention to cohabit with one another permanently".
The National Coalition for Gay and Lesbian Equality said it hoped the ruling would mean the end of homosexuals being persecuted by Home Affairs.
"The sad history of this case is that lesbian and gay couples have been harassed, detained and threatened with deportation for the past two years," said Zackie Achmat of the coalition.
The Commission on Gender Equality said it hoped the ruling would force departments such as Home Affairs to align their practices and policies to the constitution.