Two Alameda County sheriff's deputies were beaten trying to break up a fight between two men at an apartment in Castro Valley, authorities said Sunday.

The deputies responded about 11 p.m. Saturday to reports of a fight at a complex on the 2400 block of Grove Way, said Sgt. Ray Kelly, a sheriff's spokesman.

The deputies were met by 26-year-old Kelly Carter. She pointed them toward the apartment where authorities said Keith Carter, 21, and Willie Tinoifili, 28, were fighting.

"The deputies ordered the men to get on the ground and stop fighting," Kelly said. "That's when they basically turned their aggression toward our deputies and attacked them."

Keith Carter, who is trained in martial arts, smashed one of the deputies in the face, Kelly said. Carter then turned toward the other deputy, knocked him to the ground and tried to strangle him, authorities said.

As Carter wrestled with the second deputy, trying to gouge his eye out, the first deputy stumbled to his feet to help his partner, Kelly said.

At that point, Tinoifili and Kelly Carter jumped into the fray, authorities said. The first deputy shocked Keith Carter with an electric stun gun, subduing him, as backup officers swarmed to the scene, Kelly said.

The first deputy was taken to the hospital with multiple facial fractures that authorities said will probably require reconstructive surgery. The second deputy was not as badly injured and did not require hospitalization, Kelly said.

Their names have not been released.

"Despite being outnumbered and outsized, our deputies were able to persevere due to their tremendous courage, training and experience," Kelly said.

Keith Carter and Tinoifili were arrested on suspicion of attempted murder of a police officer and felony assault, and Kelly Carter was booked on suspicion of felony assault. It was not known whether Keith Carter and Kelly Carter are related.