Two Texas police officers were injured when a suspect ambushed them as they were sitting in their cruiser Friday. 

The attack occurred just after midnight in Sachse, just outside of Dallas, as officers with the Sachse Police Department were outside a Medpost Urgent Care office. 

A man walked up to the driver's side door and fired a shotgun through the window, police said. The officer in the driver's seat was struck in the head from the blast. 

CT STATE POLICE INVESTIGATE DEATH AFTER TROOPER DEPLOYS STUN GUN

Texas police ambush shooting

The Medpost Urgent Care where two Texas police officers were shot at Friday.  (Fox Dallas)

The second officer sitting in the passenger seat returned fire and hit the suspect. Both officers were taken to a hospital and released with nonlife-threatening injuries. 

The suspect was also taken to a hospital. His name and condition were not disclosed. 

The shooting is being investigated by the Texas Department of Public Safety. Fox News has reached out to the agency. 

CLICK TO GET THE FOX NEWS APP