The gunman suspected of shooting at two Fremont, California, police officers and then barricading himself inside of a burning house has died, firefighters and police confirmed to NBC Bay Area on Thursday.

The man's death, announced about 8:20 a.m., came after an overnight standoff that included Alameda County Sheriff's deputies and Fremont police trying to flush him out with tear gas in a home on Roberts Avenue in the Irvington district.

Fremont police identified him as 44-year-old Gerald Villabrille Jr. of San Jose, and said he also goes by the name of Marcus. One of the two wounded officers was left in critical condition, the other is stable, police said.

What prompted Villabrille, who has a criminal history, to allegedly shoot two officers on Wednesday afternoon in two separate incidents has not yet been revealed.

"We really don't know his motivation — really unusual behavior, really dangerous behavior, it's not acceptable at all," Fremont police spokeswoman Geneva Bosques said at a press conference Thursday.

Fremont Police Chief Richard Lucero said Villabrille barricaded himself inside the house after the second shooting, after firing shots to break the back door. He also called 911, telling them that he had another victim with him inside, but police soon determined he was lying. "He fired a shot inside the residence and claimed to have injured the hostage," Lucero said.

Police were able to initiate negotiations once Villabrille called 911, but they were unproductive, Lucero said.

Lucero said investigations revealed the car Villabrille was driving was stolen. There were a man and a woman inside who were taken into custody for questioning, he said.

Bosques said the Alameda County coroner is investigating the cause of Villabrille's death. Bosques said video footage from eyewitnesses shows large amounts of blood, indicating Villabrille was injured during the first shooting on Fremont Boulevard.

In that incident, authorities said shots were exchanged between him and a patrol officer, who was injured in the gunfire and is currently in critical condition in the ICU at Regional Medical Center in San Jose after undergoing surgery Wednesday.

Bosques would not comment on where the officer, who has been with the Fremont Police Department for a year, was injured.

"There's a reason to believe that he will survive these injuries, but the next 24-48 hours are critical," Bosques said.

Lucero said the use of additional tear gas was probably what ignited the fire. Numerous attempts to extinguish the fire turned out to be unsuccessful, he said.

"Tear gas was introduced and at some point the front porch and attic caught fire," Bosques said. Once the fire was put out, Fremont fire crews found Villabrille in a closet inside the house. Investigators also found a firearm inside the house, which they believe was used to shoot at the two officers.

The home was empty when Villabrille ran inside, authorities said, adding that they had called the man's parents to the scene to try to speak with him and get him to come out. The house was consumed in fire early Thursday morning.

Alameda County Sheriff’s deputies and Fremont police on Thursday were trying to flush out a gunman – whom they described as a homicide suspect – with tear gas who they suspect shot and injured two officers the day before.

Lin Tan, the homeowner, was in China when her 1,000-square-foot home was left severely damaged after a fire tore through it as authorities were trying to flush out the gunman with tear gas. Her sister-in-law, Lynn Zeng, told NBC Bay Area that Tan rented out the house to a couple in their 30s, who were not home at the time, but whose dog died in the fire.

Bosques said that the department has given notification to the city attorney and risk manager "who will likely assist with any homeowner claims."

Police provide details on an officer-involved shooting in Fremont.

The standoff and officer-involved shooting is unusual for the Bay Area's fourth largest city of 220,000 people, better known for its sleepy atmosphere, diverse community and good schools. Jesse Schaa, who is president of the Irvington Business District, and who owns a lawn service three doors away from the burned home on Roberts Avenue said this area is normally a "great little community. It's the Garden of Eden."

Fremont police were involved in two officer-involved shootings in 2015 and one in 2013. Usually there are less than a handful of homicides in Fremont each year. According to the department's Officer Down Memorial Page, no officer has ever died in the line of duty.

The bizarre drama began Wednesday about 1:30 p.m. during a traffic stop. That's when Bosques said an officer was making a routine traffic stop when a suspect in a car, now identified as Villabrille, backed into the police patrol vehicle on Fremont Boulevard, near O'Reilly Auto Parts.

"Shots were fired, everything happened in a matter of 10 to 15 seconds or even less," Bosques said, adding that the officer was shot once.

Fremont Officer-Involved Shooting

Villabrille ran away, Bosques said, and the injured officer was transported by paramedics to the hospital. Multiple officers responded, and the search for the suspect led them behind a Safeway near the 1300 block of Roberts Avenue at 1:43 p.m., not too far from the scene of the shooting.

Officers responded to the scene, and within minutes there was a second shooting, during which gunfire was exchanged between the suspect and a Fremont police detective, injuring him. "We were getting medical aid to the first officer, and we were calling for mutual aid from outside agencies," Bosques said. "It was very chaotic."

The detective, who was struck by gunfire once, was taken to Regional Medical Center by fellow officers and is currently in stable condition. "His injuries are still pretty serious," she said.

Police are not releasing the age of either officer at this time. Both officers have families.

Bosques said she was unsure whether the detective, who has served 10 years as a detective in the Fremont Police Department, had had time to put his bulletproof vest on. He had been in an unmarked vehicle nearby.

Bosques said both police cars had their windows shot out, and were damaged by multiple rounds of gunfire. There were no body cams on either officer.

Moments after the shootings, an employee who works at the Safeway on 3902 Washington Blvd. told NBC Bay Area she saw a man in a bloody shirt running through the store.

"He tried to jump over the fence, but couldn't; I saw him kicking the fence... it fell down, and he came towards us," recalled Sarbjeet Johal, who was eating at Pakwan restaurant on Fremont Boulevard. "We quickly ran into the restaurant and closed the doors. He couldn't get in because we were blocking the glass doors. It was scary, especially because there were women and children inside the restaurant."