The bill introduced by state MP Clover Moore, giving same-sex couples the right to adopt has been passed by the NSW parliament, after the Legislative Council voted in support of a last-minute amendment to the legislation.
The bill passed in the upper house just after 6.30pm (AEST) on Thursday, after MPs backed the lower house amendment.
The amendment, made by Planning Minister Frank Sartor, frees up adoption agencies to act on the wishes of parents regarding where their children are adopted.
It was made to temper changes made in the upper house on Wednesday night, which narrowed an exemption from the Anti-Discrimination Act for faith-based adoption agencies.
NSW State MPs were allowed a conscience vote on the historic legislation, leading to heated debate in both houses of the NSW parliament.
NSW is now the third Australian state or territory to allow same-sex adoption, after the ACT and Western Australia.