HERCULES — On a campus already beset by claims of bullying and sexual harassment, a Hercules High School transgender student told police he was assaulted by three boys Monday while exercising his right under a controversial new law to use a bathroom that matched his gender identity.

The attack was the second altercation involving a transgender student on the campus this school year and came only days after an overwhelming teachers’ vote of no-confidence in the school’s principal, partially spurred by complaints of a lack of safety on campus that had led to fights and arrests.

In the latest incident, a 15-year-old transgender male student told police he was leaving the bathroom in the 300 building at around 11 a.m. when the three suspects pushed him inside a bathroom stall and physically and sexually assaulted him.

The victim was taken to a hospital; his condition was not released Monday evening.

Hercules police Officer Connie Van Putten said investigators are treating the incident as a hate crime. Detectives processed the crime scene and interviewed witnesses Monday, but so far no suspects have been identified or arrested, Van Putten added. The suspects were described only as being 16 to 17 years old.

The student, who identifies as male, was using his right under Assembly Bill 1266, which says schools must grant transgender K-12 students access to participate in sex-segregated programs and use the restrooms and locker rooms that align with their chosen gender identity. Gov. Jerry Brown signed the bill into law in August.

An effort to repeal the controversial law failed last month after Secretary of State Debra Bowen ruled that opponents had not gathered enough valid signatures to place an initiative repealing the law on the November state ballot. Officials at the Pacific Justice Institute, one of the primary backers of the repeal effort, could not be reached Monday night.

“It’s terrible anytime an assault happens to any student,” said Carlos Alcala, a spokesman for state Assemblyman Tom Ammiano, D-San Francisco, who wrote the bill. “Our hope is that the education that goes along with this bill reduces that likelihood. We know that these things have always happened; we just want to eliminate them to the extent that it’s possible.

“If those students feel like they have impunity in attacking a transgender kid … then these types of attacks will continue and only get worse. The school, the district, the police and the district attorney need to make clear that this will not be tolerated.”

In November, transgender student Jewlyes Gutierrez was arrested and charged with battery for a fight she said happened because Hercules school officials would not help her after she complained about being a victim of bullying. A judge later ordered Gutierrez to participate in a conflict resolution program known as restorative justice; the charge will likely be dismissed if she completes the program.

About a month later, the West Contra Costa school board held a special meeting to address bullying and harassment after a federal Office of Civil Rights report uncovered the district had failed to address the issues.

The school’s principal, Jennifer Bender, could not be reached for comment late Monday. Last month, 94 percent of the school’s teachers supported a vote of no-confidence in Bender, saying she had created a toxic environment for students and staff.

West Contra Costa Unified School District board president Charles Ramsey said the kind of violence alleged in the attack will not be tolerated, and he hopes the subject will be addressed at next week’s board meeting.

“It’s a tragedy,” Ramsey said. “We … extend our sympathies and apologies to the victim. You hope that he is feeling better.”

“Obviously things are running amok at Hercules,” Ramsey added. “We have to do better. This is all escalating and starting to accumulate. Really, it’s an unsafe environment at the school and a lot of people are concerned. “

Tiffany Woods, a Pinole native and transgender programs manager at Tri-City Health Center in Fremont, said Contra Costa has long struggled to address issues pertaining to transgender youth.

“I know Contra Costa from the fact that I went to high school there. Contra Costa is just a much more conservative district,” Woods said. “I can’t imagine this kid has a whole lot of support out there. Where are they going to get it from?”

Detectives plan to return to the school Tuesday to continue investigating. Anyone with information on the incident is asked to call Hercules police at 510-724-1111.

David DeBolt covers breaking news. Contact him at 510-262-2728. Follow him at Twitter.com/daviddebolt.