Two deputies shot in Harris County, TX, are expected to survive after a Monday-night ambush in which their attacker was killed.

"They approached the residence as they were trained to. They were basically ambushed. They did what they were trained to do," HCSO Chief Deputy Edison Toquica said. "They discharged their weapons and hit the suspect. They did what they were supposed to do and they're alive because of that."

Deputies had responded to reports of shots being fired inside a home. When they arrived, the suspect shot at the deputies, and the deputies returned fire, KHOU-11 reported. The two deputies and the suspect were struck during the exchange of gunfire. The 42-year-old male suspect was declared dead at the scene.

Authorities said it appeared that the deputies did not sustain life-threatening injuries. Toquica said one officer was struck in the right leg and the other was hit in the leg and also suffered graze wounds to the head and ear. They were both reportedly stable at the hospital.

According to Toquica, the deputies are 27 and 28 years old. One has been with HCSO for one year and the other for two years.