Argentina has become the first Latin American country to legalise gay marriage after the Senate approved a bill before parliament.
The legislation, passed by the lower house in May, also gives homosexual couples the right to adopt children.
After a marathon debate the Senate voted 34 to 27 in favour of the proposals.
Outside parliament there were demonstrations from people both sides. Police kept them apart but couldn’t prevent eggs and oranges from being thrown over their heads between the rival camps.
Buenos Aires is known as a “gay friendly” tourist destination with many bars and hotels catering to homosexual clients.
Civil unions between same-sex couples are legal in the capital and some other places but there’s no nationwide law. Some gay marriages have been annulled by the Supreme Court.
Among thousands of Catholic opponents who protested, some recited prayers and displayed images of the Virgin Mary.
The issue has set Argentina’s President against the influential Catholic Church. Cristina Fernandez says she supports the bill on human rights grounds.