Twice-vetoed legislation that would sanction the type of surrogacy-for-hire contracts famously deemed unenforceable three decades ago in the state Supreme Court’s In re Baby M case has passed the Legislature a third time.

Lawmakers were hardly unanimous on the issue. On Thursday, S-482 passed the Assembly by a vote of 51-16, with six abstentions. Earlier, on March 26, it passed the Senate 25-10. The votes were along party lines, with majority Democrats voting in favor, and Republicans voting against or abstaining.