The fire broke out shortly before 4 p.m. at a single-family house at 812 A St.
San Rafael police spokeswoman Margo Rohrbacher said a police officer was stopped at a traffic light in the neighborhood and heard the "tremendous" explosion.
"A lot of people heard it," Rohrbacher said. "It was very loud."
The officer notified the San Rafael Fire Department and firefighters from Ross Valley, Larkspur, Marinwood and Kentfield assisted in combating the two-alarm blaze.
The fire was contained at about 4:30 p.m.
Rohrbacher said the fire significantly damaged the home and firefighters, with the help of local building inspectors, had to secure the house before they entered.
The south wall of the home was "completely blown out," Rohrbacher said.
Investigators located the body of a man inside the home around 7:15 p.m. The Marin County coroner's office is investigating the identity of the victim and is scheduled to conduct an autopsy Wednesday morning. There was no other report of injuries due to the fire.
"The decisive action from the fire crews really prevented further damage," Rohrbacher said, noting the home is next to a clinic and another house.
Steve Huey, general manager at the Foam Store of Marin at 813 A St., across the street from where the fire burned, said he heard the explosion around the time the fire started.
He said an exterior wall had partially collapsed onto a Honda Civic parked in the driveway.
"The house is pretty well torched," he said. A team of Marin County fire investigators from multiple county agencies is investigating the blaze, as is protocol with fatal fires in San Rafael, Rohrbacher said.
A police investigation will begin Wednesday morning. "We'll certainly work in tandem with the fire department in their investigation," Rohrbacher said.