FREMONT (CBS SF) — A man who shot and injured two police officers before barricading himself in a Fremont home last week, prompting an hours-long standoff with law enforcement, died from a self-inflicted gunshot wound to the head, according to the Alameda County coroner’s bureau.

Authorities found San Jose resident Gerald Villabrille Jr., 44, dead Thursday after they shot tear gas into the house for the second time during the standoff, causing the home to catch fire.

READ MORE: UPDATE: Cal Fire Crews Reach 80% Containment on Fremont Fire Near Napa-Sonoma County Line

Villabrille had refused to come out of the house on Roberts Avenue for hours after he ran from a nearby traffic stop Wednesday afternoon. Villabrille allegedly shot two officers at separate locations as he was fleeing from police.

One of the wounded officers, a relatively new officer shot during the initial traffic stop, remains in critical condition, police said Sunday.

The other, a detective with 10 years of experience, was shot about 10 minutes later. The detective remains in stable condition and is recovering, according to police.

The incident began at 1:33 p.m. Wednesday when the first officer stopped a reported stolen truck on Fremont Boulevard near Washington Boulevard.

The truck had been reported stolen, but investigators do not yet know whether the officer knew that at the time he pulled the vehicle over.

After the truck pulled over, the driver backed into a patrol car and there was an exchange of gunfire, critically wounding the first officer.

The driver then pulled forward again and three people ran from the traffic stop. Police chased the gunman through a nearby store and caught up with him about 10 minutes later in a backyard of the home on Roberts Avenue.

READ MORE: NHL Clears Evander Kane In Gambling Probe; Faces New Allegations Of Spousal Abuse

Gunfire was exchanged again and the detective was injured.   Hundreds of law enforcement officers from local agencies swarmed the neighborhood to search for the suspects. SWAT teams searched door-to-door and yard-to-yard. Helicopters and drones searched for the suspects by air.

At about 11:15 p.m., the team concluded that the suspect was hiding in the same house where the second shooting had happened in the backyard after he got inside by shooting out the locks of the back door.

SWAT teams surrounded the home and officers tried to communicate with him over a loudspeaker, but he didn’t answer, so they shot tear gas into the house.

The barricaded suspect then called 911 and told the officers he had a woman hostage, a claim authorities eventually determined was false.

Meanwhile, they continued talking to the suspect, who told them he was armed and dangerous and potentially suicidal.

The suspect again cut off negotiations, so officers used gas a second time in the early morning. This time, the gas ignited a small fire inside the home.

Firefighters working with a SWAT team tried to put the fire out, but were unable to go inside because the suspect remained barricaded. Authorities continued trying to negotiate his surrender, but he refused to come out, and eventually flames consumed the home and the officers lost contact with him again.

By dawn, the home had burned to the ground. There, police found the suspect dead in a closet and recovered the gun believed to have been used in the shootings.

MORE NEWS: Posey, Bryant Lead Giants Past Padres, Increase NL West Lead To 2 Games

TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News Service contributed to this report.