LIVERMORE (CBS SF) — An irate man was fatally shot early Thursday after he barricaded himself in a home, set the residence on fire and then allegedly approached Livermore police officers carrying a shot gun, authorities said.

The incident began with 911 calls to Livermore police at around 2:50 a.m. reporting a neighborhood resident in the Sun Valley Mobile Estates standing outside and acting bizarrely, challenging people to a fight.

READ MORE: UPDATE: Wind-Whipped Big Sur Wildfire Grows To 1,500 Acres, Blaze Erupts Near Geysers Peak In Sonoma

Arriving officers confronted the man who refused to obey their commands and fled inside a home.

During negotiations, officers said, shots began to ring out from the home. A police negotiator attempted to calm the man, who kept making suicidal statements.

After two hours, smoke began to billow out of the home.

“Eventually, there was a lot of smoke coming out of the house and then there was fire,” said neighbor Spencer Browning. “The fire got really big. It engulfed the trees next door.”

The man emerged from the burning home, armed with a shot gun. Officers opened fire and the man went down to the ground.

READ MORE: Pipeline Of Illegal Weapons Shutdown; Four Arrested In San Mateo, Alameda County Raids

“Whoever set the fire in the house came out on the porch,” Browning said. “We were told by the police to take cover. Then there was some shots fired.”

The officers attempted to give medical assistance to the man, who was pronounced dead at the scene.

It was a terrifying couple of hours for neighbors as police evacuated nearby homes.

“Scared, especially after the first gunshots that i heard and wondering if they are going to tell us anything,” said nearby resident Nadine Nemanick.

The shooting remains under investigation.

MORE NEWS: Facebook Faces Wrongful Death Suit From Family Of Slain Oakland Federal Guard David Underwood

Livermore police say no officers were injured and no one else was inside the burned-out mobile home. As of Thursday at noon, investigators haven’t released the identity of the man killed or the names of the officers involved.