Mack Beggs, a 17-year-old high school wrestler who is transitioning from female to male, took home gold in the 110-weight class of the Texas girls state championship after the state refused to allow the student to compete against boys.

Beggs, his family and many of his opponents wanted him to wrestle against male wrestlers, but state sport regulations require athletes to compete according to their birth gender.

MORE TOP STORIES:

NAACP calls for boycott of North Carolina over voting, bathroom laws

Trump's transgender move puts spotlight on Supreme Court case

Some of the wrestler’s opponents have said Beggs had an unfair advantage among girls because of the testosterone he is taking as a part of his gender transition.

The University Interscholastic League, which governs school sports in Texas, said the state’s education code allows the use of a banned drug such as steroids if it “is prescribed by a medical practitioner for a valid medical purpose.”

Beggs’ win came days after the Trump administration revoked landmark guidance to public schools letting transgender students use the bathrooms of their choice, reversing a signature initiative of former Democratic President Barack Obama.

Reversing the guidelines stands to inflame passions in the conflict in the United States between believers in traditional values and those advocating lesbian, gay, bisexual and transgender rights.

High school athlete Mack Beggs, a transgender boy, competes in a state championship girls wrestling competition, in Cypress, Texas, U.S., February 24, 2017. Courtesy of Eric Schell/Handout via REUTERS

Beggs, a junior at Trinity High School in the Dallas suburb of Euless, had a 52-0 record ahead of the weekend tournament and was favored to win the high school championship in his weight class. On Saturday, he beat Chelsea Sanchez 12-2 to earn the championship.

After his victory Beggs told reporters he wanted the focus of Saturday’s championship to be on his teammates rather than him.

“That’s honestly what the spotlight should’ve been on, my teammates,” said Beggs, while backed by his team and wearing a gold medal around his neck.

“The hard work that I put in the practice room with them beside me ... that’s what the spotlight should have been on ... because I would not be here without them,” Beggs said.

About a week ago, Beggs won a regional championship after a female wrestler from a Dallas-area high school forfeited the final.

The parent of another girl who wrestles for the same Dallas-area high school had filed a lawsuit trying to block Beggs, saying his use of testosterone increases his strength and could pose a risk to opponents.

Nancy Beggs, the wrestler’s grandmother and guardian, told the Dallas Morning News after the forfeit in the regional championship match: “Today was not about their students winning. Today was about bias, hatred and ignorance.”

His grandmother could not be reached for comment by Reuters on Sunday.

According to transathlete.com, which provides information for transgender athletes, Texas is one of seven U.S. states with policies it sees as discriminatory against transgender athletes.

The day after the championship, Beggs was both praised and criticized on social media.

“Any other person taking steroids would have been disqualified on the spot. But since this person wants to change from a girl to a boy it makes it ok?,” wrote Facebook user Russell Parks.

“Rock on, Mack! Reach for your dreams,” responded another, named Noelle Gray.