Indiana lawmakers on Tuesday overrode Governor Eric Holcomb's veto of a bill that prohibits transgender students from participating on school sports teams that match their gender identity.

Holcomb, a Republican, vetoed House Bill 1041 in March.

According to The Indianapolis Star, the House voted 67-28 to override Holcomb's veto, while the Senate voted 32-15. Republicans hold a supermajority in both chambers.

Within minutes of the final tally, the American Civil Liberties Union (ACLU) of Indiana filed a lawsuit in federal court challenging the legislation.

House Bill 1041 was authored by Representative Michelle Davis, a Republican from Whiteland.

Davis told the Star that the bill was needed to “maintain fair competition in girls' sports now and in the future.”

Senate Minority Leader Greg Taylor, a Democrat from Indianapolis, criticized the measure, calling it “blatantly discriminatory.”

The Human Rights Campaign (HRC), the nation's largest LGBTQ rights advocate, said that lawmakers were attacking “a group of children for political gain” and called for the bill's repeal.

“We saw that this doesn’t need to be a partisan issue when the governor rightly vetoed this bill and said he couldn’t find any evidence that trans kids playing sports was a problem in the state,” said HRC State Legislative Director and Senior Counsel Cathryn Oakley. “The backers of the bill could not summon even a single example where someone was harmed or even affected as a result of trans kids participating in school sports. But transgender kids, even those who have no interest in playing sports, will be harmed by this law. They’ll be denied a chance to play, to learn about teamwork and responsibility, and all the other benefits that come from playing school sports – all because a bunch of legislators are pandering to a far-right portion of their base.”

“This legislation is wrong, it is unnecessary, it is damaging to the mental and physical wellbeing of a vulnerable population of kids, and I look forward to the day when this law is overturned or repealed,” Oakley added.

The bill is expected to take effect on July 1.