Police trying to help an officer who was being kicked in the face by a juvenile were denied access to a Roxbury community center by a front desk worker who feared being reprimanded by her boss, the department said.

“Responding officers, forced to watch the altercation through the community center’s glass doors, were unable to gain entry and provide support to the struggling officer because a front desk staffer refused to let them in,” according to the Boston Police Department.

“The front desk staffer stated that she had been reprimanded by a supervisor who took issue with her decision to allow officers inside the building in the first place,” police added in a statement.

It all began, police said, when two officers followed a male juvenile, for whom they had a search warrant related to a gun investigation, and his friend, and saw them walk into the Dewitt Community Center in Roxbury on Thursday. The officers followed the juveniles into the community center and were shown to a second-floor classroom.

“As soon as the suspects exited the classroom, both attempted to flee the scene while pushing and physically assaulting the officers. While one of the suspects was subdued in the hallway, the other suspect bolted towards the stairwell leading to the first-floor exit,” Boston police said.

“A physical altercation ensued causing both the officer and suspect to tumble and fall down the stairs leading to the first floor,” police added. “As the officer struggled to subdue and maintain control of the suspect, the suspect repeatedly kicked the officer in the face and upper body.”

Additional officers, responding to the fracas, attempted to enter the community center, BPD said, but were not allowed in. They eventually got inside, where they helped subdue the suspect and reportedly discovered a .22-caliber revolver. It was not immediately clear if the juvenile with the gun was the same juvenile that was the subject of the search warrant.

A person staffing the front desk said she delayed allowing the officers inside because a supervisor had admonished her for letting the original officers in — leaving the officers “dismayed and disillusioned,” BPD said.

Two officers were transported to a local hospital with non-life-threatening injuries. Both juveniles, ages 15 and 16, were arrested.

The 15-year-old was charged with assault and battery on a police officer and the 16-year-old was charged with unlawful possession of a firearm, assault and battery on a police officer and other related charges.

Both were arraigned in juvenile court yesterday and had been on bail awaiting trial on gun and robbery charges, according to the Suffolk District Attorney’s Office. Both had their bail revoked. The 16-year-old was held on an additional $25,000 while the 15-year-old was held on an additional $5,000.

The director of the Dewitt Community Center, as well as the chief executive of the Madison Park Development Corp., which operates the center, did not respond to repeated requests for comment yesterday.