Houston police have released a series of bodycam videos showing officers respond to an active home invasion robbery when one of the suspects ambushed them with gunfire in front of a mother and her children.

Three men were arrested, including two gunmen who appear inside the home on video and their alleged getaway driver, according to authorities.

A mother on the floor pleading for help inside warns officers that "there's another" when they enter the home and encounter the first suspect in her kitchen.

A second later, the second man popped out of a back doorway and opened fire.

‘GOTAWAY’ ILLEGAL AND TREN DE ARAGUA GANG MEMBER ACCUSED IN SUBURBAN HOTEL MURDER

houston shootout bwc

A still image taken from Houston police bodycam shows officers arrive in the middle of an active armed home invasion. Moments later, one of the officers would be shot by a suspect hidden in a back room. (Houston Police Department)

One of the officers suffered a gunshot wound to the leg after police say Raymond Perez, 35, began shooting.

Video shows he immediately returned fire as he collapsed to the ground. At the same time, the other officer handcuffed Michael Perez, 38, in the kitchen of a home on Alderney Drive. The video shows he recovered a handgun during the arrest, and Perez can be heard telling the officer he also had a knife.

Raymond Perez fled out the back door, but backup officers captured him on the street about a block away, the video shows.

WATCH: Houston PD bodycam shows shootout with home invasion suspects in front of mother and children

The wounded officer, Scott Durfee, struggles through the pain on the floor as he keeps his weapon up in an effort to protect a woman and her children who were just a few feet away during the exchange of gunfire.

‘SEVEN DEADLY SINS’ BIKER GANG FOUNDER KILLS 7 PEOPLE AND A DOG

raymond perez hpd mugshot

Alleged shooter Raymond Perez was arrested outside by responding officers after police say he shot and wounded one of their colleagues inside the victim's home. (Houston Police Department)

His partner handcuffed Michael Perez and then raced over with a tourniquet. An ambulance arrived a few minutes later to take Durfee, an 8-year veteran of the department, to Memorial Hermann-Texas Medical Center. He was treated and has since been released.

NORTH CAROLINA MANHUNT FOR ESCAPED MURDERER ENDS MORE THAN 100 MILES AWAY

michael perez hpd mugshot

Police arrested Michael Perez, 38, in the kitchen of the victim's home. (Houston Police Department)

Police later arrested a third suspect, the alleged wheelman identified as Brian A. Garcia Chavez, 18, on Hollister Road.

The younger Perez faces charges of aggravated assault against a public servant, aggravated robbery with a deadly weapon and unlawful carrying of a weapon. When police arrested him, he was already wearing an ankle monitor.

brian a garcia chavez hpd mugshot

Suspected getaway driver Brian A. Garcia Chavez was arrested later by an HPD tactical team, authorities said. (Houston Police Department)

CLICK TO GET THE FOX NEWS APP

The other two men face charges of aggravated robbery with a deadly weapon.

The shooting happened on Sept. 17, but police released the video Thursday. In addition to the criminal investigation, all police-involved shootings are reviewed by internal affairs and the Harris County District Attorney's Office, police said.

Fox News' Sophia Compton contributed to this report.