Hundreds of Brentwood High School students celebrated their school spirit at a homecoming pep rally Friday to show support for their classmates and football team in a community shaken by recent gang-related slayings of teenagers — both girls and boys.

The gymnasium in the high school’s Sonderling Center shook with applause and cheers for the marching band, cheerleaders and athletes, with students and staff decked in the school colors of green and white. The Indians, the high school football team, face Walt Whitman High School on Saturday in the homecoming game.

“It has been a rough couple of months. When we lose kids, it is a tragedy and very sad for us,” said Principal Richard Loeschner, adding that Friday’s pep rally was the culmination of “Spirit Week” at the high school. “This really demonstrates for the community as well as the students that we are a family . . . no matter how difficult the times can be.”

The Brentwood community has been rocked by recent gang violence.

Suffolk police said Thursday that they had discovered the skeletal remains of a Brentwood teenager — a known MS-13 gang member — who police believe was beaten to death by gang members. The remains of Jose Peña-Hernandez, 18, were unearthed Monday on the grounds of the Pilgrim Psychiatric Center, police said.

It marked the sixth such discovery of a gang-related homicide by assault in Brentwood in the last month.

advertisement | advertise on newsday

Suffolk County Police Commissioner Timothy Sini said Thursday that investigators have rounded up more than 30 MS-13 gang members since the gang-related beating deaths last month of Brentwood High School students Nisa Mickens, 15, and Kayla Cuevas, 16.

The slayings of the girls, who were best friends, sparked community outrage and the ramped-up law enforcement response that Sini described as a mission to “decimate” the violent gang.

Peña-Hernandez is one of three teenage males who were reported missing earlier this year and whose skeletal remains were found in the last month near the psychiatric center in an apparent MS-13 dumping ground. The others were Oscar Acosta, 19, and Miguel García Morán, 15.

Police believe all three of those homicides were likely perpetrated by gang members.

School officials plan to pay tribute to the teens at halftime during Saturday’s football game, which starts at 1:30 p.m.

Football players Harold Camacho, 16, a junior, and Devin Cheah, 15, a sophomore, said Friday’s pep rally showed what Brentwood High is really all about. Both students said they do not fear for their safety in school and that the school has security in hand.

“It’s an honor to be at the pep rally. It really is,” said Cheah, of Bay Shore. “Brentwood is a good high school to come to.”

“It’s Brentwood High School and we get to make the best out of everything,” said Camacho, of Bay Shore.