David Allen George Bohr was charged with murder with a sentencing enhancement for causing death.
Bohr was accused of killing the victim, whose identity has not yet been released, on Monday.
According to Irvine police, they received a 911 text asking for help at 2:19 a.m. Monday. The witness told police he heard Bohr and another roommate arguing before gun shots rang out, police said.
SUGGESTED: Man allegedly kills roommate in Irvine
The roommate continued texting with dispatchers as he locked himself in his bedroom, police said.
When police arrived they found the victim behind the front door and confirmed he was dead, police said. Bohr allegedly stood at the top of the stairs holding a gun to his head, prompting a standoff with officers, police said.
Police evacuated neighboring residences as they continued negotiating with Bohr, police said. Meanwhile, SWAT officers and Orange County Fire Authority firefighters got two other roommates out of the residence, police said.
Bohr was taken into custody at 5:09 a.m., police said.