The Oakland man detained for shooting at residents and law enforcement officers has died, police said late Friday.

Police said 32-year-old Jesse Enjaian succumbed to his injuries while at a hospital where he was rushed after being taken into custody. As of Friday night, the cause of death remains unclear.

"We had our hands full," police spokeswoman Officer Johnna Watson said. "This was a very dangerous situation."

Oakland police issued a Nixle alert around 9 a.m., informing people that a man, armed with a rifle with a scope, was at 98th and Golf Links Road. The public was asked to avoid the area. [[414097573, C]]

Enjaian was first spotted on the 9500 block of Las Vegas Avenue, just off Interstate Highway 580, according to police. He was shooting at residents and parked cars and fired on Oakland police officers as they arrived, Watson said.

NBC Bay Area SkyRanger footage showed Enjaian looking out of a window of a house, pointing his gun outside and firing at police officers, neighboring houses and even a news helicopter.

At one point, Enjaian came out with the rifle and used a spray paint can to draw obscene graffiti on the garage doors. He then walked onto the street and vandalized a parked car.

Some rounds fired toward Oakland police officers struck the ground near them, so they took cover and retreated. They called for all available officers and brought in an armored vehicle for protection.

At one point, one officer fired at Enjaian, according to Watson, but she didn't know if he was hit by the gunfire. The suspect had been injured before he was taken into custody, but Watson said it's not clear if he was shot by the officer or was wounded some other way.

While Enjaian was at the hospital, police clarified that his wounds were "not non life-threatening."

No other injuries were reported and officers spent a long time canvassing the neighborhood even after Enjaian had been taken away.

The California Highway Patrol shut down eastbound Highway 580 during the shooting. The gunfire continued for some time and as of about 9:40 a.m., CHP officials said shots were still being fired. By 10 a.m., CHP officials said the highway had reopened.

"This is extremely concerning for the Oakland police Department," Watson said. "We have a lot of traffic that comes through the area we also have a lot of schools in the area."

Students at nearby Bishop O'Dowd High School were told to shelter in place and stay away from the south side of the campus during the encounter. Barack Obama Academy, a charter elementary school nearby, was evacuated. The area of 98th and Las Vegas avenues remained closed while police investigate.

Neighbor Andrea Jones said she told her 6-year-old son to be careful when their neighborhood was under siege.

"I screamed immediately , 'Get down, get down. Jesse is shooting,'” she said.

Jones says Enjaian moved in next door two-and-a-half years ago. His home was formally owned by his grandparents. The man’s grandparents treated Jones like family, but Enjaian was simply cordial.

“He’s always been cool, always been aloof,” she said.

Jones said she was aware of Enjaian's past — as a student of the University of California, Los Angeles and later the University of Michigan.

Court documents indicate that University Of Michigan police in 2011 investigated Enjaian for stalking a fellow law student. The woman complained that he wouldn't stop emailing, texting and trying to contact her.

Police served a search warrant and confiscated Enjaian's computers, but he was never charged with a crime, documents show.

The case prompted Enjaian to file two lawsuits. The first was brought against the University of Michigan Police Department for violating his civil rights and refusing to return his computers. And the second was filed against the National Law Journal, accusing them of defaming him when they published a story headlined "Law School Alum Accused of Stalking".

He took issue with the use of the word "accused", since he'd never been charged, according to court documents. Both lawsuits were dismissed.

Back in Oakland, a neighbor, who asked not to be identified, told NBC Bay Area that Enjaian last week shot at a parked vehicle. Jones said she reported his actions to the police and believes that may have made her his target.

“My heart is breaking for this whole situation. I didn’t think he was capable of this," she said.