FREMONT (KRON) – The suspect that is accused of shooting two Fremont police officers died on Thursday of a self-inflicted gunshot wound to his head. He barricaded himself inside a Fremont home for hours, police said.

Police found the body of Gerald Villabrille Jr., 44-year-old of San Jose, dead in a home in the 1300 block of Roberts Avenue.

Villabrille entered the home after a shootout with police that injured two Fremont police officers on Wednesday night.

After an unproductive attempt to negotiate with the homicide suspect, police began to release tear gas into the residence in an effort to flush him out.

By 3 a.m., the house caught fire and burned for several hours.

Police found the man dead in a closet at around 8:25 a.m. after the house burned to the ground. Police also found recovered a handgun.

The homeowners were not there at the time and have no relation to Villabrille. However, he held their dog hostage and the dog is now deceased.

The renters of the destroyed home were put in touch with Red Cross the evening of the incident, according to police. There is also a GoFundMe page set up for the two people that lost their home.

//platform.twitter.com/widgets.js

On Wednesday afternoon, an officer attempted to pull Villabrille over for a routine traffic check near the intersection of Washington and Fremont Boulevard in the Irvington Area.

The suspect then backed his vehicle into the police car at which point shots were exchanged, according to Fremont police spokesperson, Geneva Bosques. One officer was shot during this exchange.

Officers responding to the scene tracked the suspect 10 minutes later in the 1300 block of Roberts Avenue. Gunfire was exchanged again and a second officer was shot twice.

The two police officers shot were rushed to the hospital.

The first officer shot, a detective with one year of service, was shot once. He is out of surgery and is in critical condition.

The second officer shot, a detective with 10 years of service, was shot once and is in stable condition.

Officials are not releasing any information as to where or how the officers were hit.

It is unclear at this time why the suspect did not stop for the routine traffic check, but police said that he has a criminal history.