The United States Supreme Court has ruled that states can bar transgender women and girls from competing in female sports at public schools and colleges, handing supporters of the restrictions a major legal victory in one of the country’s most contentious culture war debates.

In a decision split along ideological lines, the court held that state laws in Idaho and West Virginia allowing participation based on a person’s sex recorded at birth do not violate the Constitution or the federal civil rights law known as Title IX.

Read also: Thucydides trap, China, the United States and Africa’s emergence as the new strategic battleground

The ruling is expected to strengthen similar laws already in force across more than two dozen states and gives state governments broad authority to set eligibility rules for women’s and girls’ sports.

Writing for the six member conservative majority, Justice Brett Kavanaugh said the court’s decision reflected the law rather than a broader political judgment.