FORT WORTH, Texas — A gunman hiding in a backyard shed opened fire on two officers and wounded them after they had responded to the home to check on a suicide report, police said Saturday.

Before they were shot Friday night, the officers discovered an elderly man dead in the Fort Worth home, apparently of a gunshot wound, and someone inside the home directed them to a “potential witness” in the tool shed, authorities said. When they opened the shed doors, the gunman started firing.

The officers, both of whom were wearing body armor, returned fire and took cover until backup officers arrived.

Tactical-squad officers tried to negotiate with the suspect and tear gas eventually was inserted into the shed, but with no response. Finally, an armored police vehicle breached a wall and officers found the suspect dead inside.

It was not immediately clear if the suspect died from a police bullet or his own, police spokesman Officer Daniel Segura said.

The motive for the shooting is unclear, but Segura said there had been at least two calls for disturbances involving a father and son at the address over the past two years, as well as one in 2012. Authorities have not released the names of the dead men or said if they were related.

Officer Xavier Serrano, an eight-year veteran of the force, was in stable condition at John Peter Smith Hospital in Fort Worth pending further surgery for his wounds to his upper torso, arms and shoulder. Probationary Officer Ray Azucena, suffered a minor injury when he was shot in his armor. He was treated and released.

Azucena and Serrano, his field training officer, were answering a suicide report about 8:30 p.m. Friday from the home in southwestern Fort Worth.