Five Montgomery County sheriff's deputies were struck by gunfire and a child was wounded Friday morning after a gunman broke into a home in Conroe, Texas, and held a woman and three children hostage. The suspect was killed in the shootout that followed, and the hostages were rescued.

Deputies responded at about 6:45 a.m. Central time to a family-violence call in the Artavia neighborhood, in the 14900 block of Galileo Gates Drive, about 25 miles north of Houston. Sheriff Wesley Doolittle said the man, identified as 45-year-old Buck Caples, had forced his way into the home, where a 34-year-old woman and three children — ages 9, 11 and 18 — were living. Caples had a previous relationship with the woman but did not live at the home, the sheriff said.

Caples barricaded himself inside for about two hours. Deputies waited outside until they heard what they believed was a gunshot from inside the house, Doolittle said. That shot, fired by Caples, struck an 18-year-old with shrapnel and left the child with a superficial injury, according to the sheriff and the Associated Press. Deputies then moved in after observing Caples holding one of the victims at gunpoint.

Inside, Caples — barricaded in a room — exchanged gunfire with the entry team. During the exchange, deputies rescued the hostages and got them safely out of the house. None of the hostages was struck by gunfire during the exchange, the sheriff's office said. Caples was confirmed dead at the scene.

Four deputies were taken to hospitals, two of them with injuries serious enough to require surgery, Doolittle said. One deputy was shot in the abdomen and another in the back; both remained in serious condition. A third deputy was shot in the forearm and a fourth in the hand; both were in stable condition and expected to recover. A fifth deputy was struck in his body armor and was evaluated and cleared at the scene. Four of the injured deputies were members of the sheriff's office SWAT team; the fifth was assigned to the Crime Reduction Unit.

Doolittle said Caples was on parole at the time of the shooting and had a violent past, including a 2015 arrest for first-degree felony aggravated kidnapping, according to records obtained by KVUE. Investigators believe he was armed with a 9 mm handgun, the sheriff said.

The Montgomery County Sheriff's Office said in a social media post around 9:18 a.m. that multiple units, including SWAT, had responded to the barricaded subject. The sheriff's office said the scene was secured and there was no threat to the public, though a heavy police presence remained around Galileo Gates Drive while detectives continued their investigation. The investigation is ongoing.

The shooting is the latest reminder of the danger officers face when responding to domestic-violence calls, which can turn violent with little warning — and of the risk posed when a person with a history of violent crime is out on parole. The standoff unfolded in Artavia, a master-planned community of family homes south of State Highway 242, in the morning hours as residents were starting their day. For the five deputies and their families, the outcome could have been far worse — the sheriff noted that body armor saved one deputy from serious injury. Authorities have not yet said when the deputies who were hospitalized will be released, and the sheriff's office said it would update the public as new information becomes available about their conditions.