Labor and the Coalition joined forces to defeat a Greens bill two years ago that would have revoked the right of religious schools in Victoria to target students for being gay.

The Greens sought in 2016 to strip Victoria’s Equal Opportunity Act of three exemptions that allow faith-based schools to discriminate against students based on their sex, sexual orientation, lawful sexual activity or gender identity.

Religious schools in Victoria have the right to discriminate against gay students, under an exemption to equal opportunity laws. Credit:Fairfax Media

But the private member's bill was voted down by the major parties, with Sex Party MP Fiona Patten the only MP willing to vote with the Greens in the upper house.

The Andrews government opposed the bill while pursuing its own reforms to the state’s equal opportunity laws, which would have wound back the right of religious schools to turn teachers away due to their sexuality or gender.