"We need to fight and resist all forms of discrimination and prejudice, including homophobia," Nosiviwe Mapisa-Nqakula, the home affairs minister, said before the vote on Tuesday.
 
The measure was also warmly welcomed as an historic step by the Joint Working Group, a national network of 17 gay, bisexual and transgender organisations.
 
"The [bill] signals a rejection of previous attempts to render lesbian and gay people as second-class citizens," Fikile Vilakazi, the group's spokesman, said in a statement.
 
"It demonstrates powerfully the commitment of our lawmakers to ensuring that all human beings are treated with dignity."
 
Conservative anger
 
The government was obliged to introduce legislation regulating same-sex partnerships after the country's highest court ruled last December that existing laws discriminated against gays and lesbians by failing to guarantee them the same constitutional rights as heterosexual couples.
 
However, the legislation was criticised by Christian and conservative parties.
 
"This is the saddest day of the 12 years of our democratic parliament," Kenneth Meshoe, the African Christian Democratic Party leader, said.
 
"It is indeed very sad that the ANC leadership chose to support this bill in spite of the overwhelming objections."
 
Discrimination
 
However, members of the ruling African National Congress (ANC) defended the bill, saying many gay people had fought in the struggle against apartheid.
 
Mosiuoa Lekota, the South African defence minister, said: "How can we now deny them equal rights?"
 
The bill will now be sent to the national council of provinces for agreement, a mere formality, before being signed into law by Thabo Mbeki, the South African president.
 
Gay people in Africa are routinely subjected to discrimination and homosexuality is illegal in a number of countries.
 
Robert Mugabe, president of neigbhouring Zimbabwe, sparked outrage among gay rights campaigners when he described gays as "worse than pigs and dogs" several years ago.