SAN JOSE -- A quiet South San Jose neighborhood Friday night became the scene of a sudden inferno that consumed two homes when a stolen car slammed into one of the homes, rupturing a gas line.

The car, carrying four juveniles, spun out of control just before midnight when the driver tried to evade police.

No one was seriously injured in the explosion and fire, although a passenger and one police officer were treated at a nearby hospital after the crash.

"This had the potential of leading to some fatal outcomes," said Officer Albert Morales, a police spokesman. "Luckily, we only had a couple of minor injuries."

One juvenile -- the driver -- was booked into Juvenile Hall, Morales said. The others were interviewed and released to their parents or guardians.

The homes, at 396 and 393 Bluefield Drive, were occupied at the time of the crash, but everyone inside them escaped unharmed, Morales said.

The incident began when a police officer tried to stop a car traveling with no headlights on Vistapark Drive near Branham Lane. The car made a quick right onto Bluefield and veered into a corner house, Morales said.

Al Lucero, 46, who lives directly across the street from that house, said he had just turned off his television and was getting ready to go to bed when he heard the sound of sirens approaching. "Then I heard a big loud boom," he said.

By the time Lucero got outside, a police officer had one male in handcuffs on the ground, and two parked cars and the stolen vehicle were on fire.

As the corner house went up in flames, Lucero said, half a dozen police officers arrived and began banging on neighbors' doors to get people out of the two houses, including several children.

Anthony Bertuccelli, 31, who lives half a mile away, said he was listening to his smartphone police scanner app when he heard police pursuing a 1991 gold Toyota Camry.

Suddenly, Bertuccelli heard someone on the police scanner shout, "Car in the house, car in the house, car in the house."

By the time he arrived on Bluefield Drive, "both houses were in flames," Bertuccelli said. "It was huge."

A fire department spokesman said one home was destroyed and the second had extensive damage.

Both homes were "fully involved" by the time the fire department reached the scene, said senior dispatcher Eric Joslin.

The two-alarm fire, reported at 11:55 p.m., was battled by about 40 firefighters, Joslin said.

PG&E crews also responded to the scene, eventually declaring that the area was safe for residents to return.

Contact Pete Carey at 408-920-5419 Follow him on Twitter.com/petecarey