Chile has approved a landmark law allowing same-sex marriage in the historically Catholic country.
The legislation, overwhelmingly approved by parliament on Tuesday, also enables gay couples to adopt children.
The bill was supported by President Sebastián Piñera, who has to sign it into law. But it has been criticised by members of his conservative coalition.
Chile's LGBT community has long pushed for the law, which has been stalled by Congress since 2017.
The Latin American country approved civil unions between same-sex couples in 2015, allowing them to register for a Civil Union Agreement (AUC) that gives some legal benefits.
But the bill to legalise same-sex marriage has languished in Congress for four years after it was presented by former left-leaning President Michelle Bachelet.
On Tuesday, the bill was passed in the lower house of parliament - shortly after its passage in the Senate - by 82 votes to 20. There were two abstentions.
President Piñera had vowed to push the legislation through parliament during his annual State of the Union address in June this year.
In comments that stunned some of his conservative allies, he said in his address that Chile must "guarantee this freedom and dignity to all people".
"I think we should deepen the value of freedom, including the freedom to love and to form a family with a loved one. Also the value of the dignity of all relationships of love and affection between two people," the right-wing leader added.
The move had faced strong criticism from some of the president's allies, including evangelical lawmaker Leonidas Romero of the National Renewal (RN) party.
Mr Romero had described the law change as "a tremendous betrayal for the Christian world".
Chile joins a handful of Latin American countries to recognise marriage between same-sex couples. Others include Argentina, Brazil, Colombia, Costa Rica, Uruguay, and 18 states in Mexico and Mexico City.