MONTGOMERY, Ala. (WIAT) — Alabama lawmakers passed two bills addressing transgender youth on their final day of the session, following much protest from Democrats.

“This is invasive,” Rep. Neil Rafferty, D-Birmingham, said during debate over SB184, which creates criminal penalties for doctors who prescribe medical treatments to transgender minors wanting to transition.

“The ugly popped up in all sorts of bills, like ones that blatantly discriminate against transgender youth, which we’re going to waste time on today,” Rep. Chris England, D-Tuscaloosa, said.

Rep. Wes Allen, R-Troy, defended the bill, saying it protects children in the same way legislation that prohibits getting a tattoo or vaping would.

“We make decisions in this body all the time that are to protect children from making decisions that could permanently harm them before they are old enough and have a brain enough to understand their decisions,” Allen said.

House Minority Leader Anthony Daniels, D-Huntsville, says he doesn’t think those bills will hold up in court.

“I do know that there are organizations out there that will be filing litigation against these particular bills. I think they will be successful,” Daniels said.

Ultimately the House passed the bill banning medical treatments by a vote of 66 to 28, sending it next to the Governor.

Meanwhile, the Senate passed a bill barring transgender students from using bathrooms or lockerrooms aligned with their gender identity. Lawmakers amended that bill, adding a section similar to the so-called ‘Don’t say Gay’ law in Florida, banning teachers from instruction about sexuality and gender. The House agreed with those changes, sending the bill to the Governor.

While social issues dominated debate Thursday, this session overall passed record high General Fund and Education Trust Fund Budgets, and also made Alabama the 22nd state to pass permitless concealed carry, among many other bills.