The body of the gunman suspected of shooting and wounding two Fremont, Calif., police officers was found Thursday morning inside the house where he was barricaded for hours in the residential neighborhood.

Fremont Division Fire Chief Diane Hendry told FoxNews.com that the suspect’s body was found inside a closet in the home.

Two officers from the Fremont Police Department were shot Wednesday afternoon after a traffic stop turned violent, prompting a manhunt that involved a house to house search that lasted well into the night.

The lone suspect was eventually tracked down to a home in the San Francisco Bay-area community of Fremont, where he was involved in the standoff, said Sgt. Ray Kelly of the Alameda County Sheriff's office.

He said no one was home when the suspect broke in and barricaded himself inside. Tear gas was blamed after the roof of the house caught fire. Fire crews worked to extinguish the blaze.

The incident started when an officer with a year's service with the department stopped a white pickup truck in Fremont, which is about 40 miles south of San Francisco, police spokeswoman Geneva Bosques said.

The pickup truck backed up into the officer's patrol car, a person in the truck fired shots that injured the officer and the shooter and another suspect fled on foot.

Shortly after that officers from several law enforcement agencies flooded the area and searching got underway.

A while later, a Fremont police officer with about 10 years of service with the department was wounded in a shootout with the suspect, officials said.

Bosques told the East Bay Times that the officer in the initial shooting was in critical condition after surgery. The second officer remained in stable condition.

He said the others were with the suspect when the shooting erupted, but just the single gunman was accused in the violence.

The Associated Press contributed to this report