By CBSBoston.com Staff

BOSTON (CBS) – An 11-year-old boy was rushed into surgery after he suffered “vicious injuries” when he was mauled by a pit bull in Dorchester Wednesday afternoon. The child was saved when an off-duty police officer rushed in to help.

It happened on Rock Terrace around 1 p.m. Boston Police Commissioner William Gross said the boy was mauled in the back yard of a home, suffering injuries to his neck, arm, and groin.

READ MORE: Families Separated By COVID Eager To Reunite When US Allows Vaccinated International Travelers

An off-duty officer jumped several fences and rushed to help the child. “The dog continues to viciously attack the young child,” Gross said. “Fearing for the child’s safety the officer discharged his firearm, halting the attack.”

Animal control took 2 pit bulls away after the attack in Dorchester Wednesday. (WBZ-TV)

The boy was rushed to an area hospital for surgery. The officer was taken to the hospital as a precaution.

Gross said the situation could have been worse as there was also another dog nearby.

“At this point we’re just thankful the child was saved,” said Gross. “Thank god the officer was there to intervene. If he didn’t, the dog was going to continue to attack this child. There was also another pit bull being restrained by an individual that I’m confident would have joined in the attack.”

READ MORE: 'It's Unethical': Hopkinton Drug Advertises Supply Of Ivermectin, Despite Ineffectiveness Against COVID

Animal Control removed the two dogs from the home.

It is not clear if the dog that attacked the boy was hit when the officer fired his gun.

“I want to personally thank the officer for intervening and saving this child’s life,” Suffolk County District Attorney Rachael Rollins said.

Mayor Marty Walsh said, “My heart goes out to the young boy injured in this incredibly sad and tragic event this afternoon. I wish him and his family a speedy recovery, and I ask everyone to keep him in your prayers.”

MORE NEWS: Arlington Police Warn Parents About 'Benadryl Challenge' On TikTok

Gross said Boston Police have responded to several calls for unleashed dogs at the home in the past. It was not immediately clear the relationship between the child and the dog owner.

CBSBoston.com Staff