Discuss as:

LA police kill man shooting at cars in Hollywood

Updated 3:44 p.m. ET:  The gunman who died after a shootout with police in Hollywood was identified Saturday as 26-year-old Tyler Brehm, NBC Los Angeles reported.

A spokesman for the Los Angeles County coroner's office said Brehm during the shootout with police, after opening fire Friday morning in a busy area near Sunset Boulevard and Vine Street.

Earlier:

LOS ANGELES -- A gunman firing randomly at cars and shouting "kill me" and "I'm gonna die!" was shot to death by police in the heart of Hollywood Friday, authorities and a witnesses reported.

The unidentified man was pronounced dead at the scene. No officers were hurt, Los Angeles police Officer Cleon Joseph said.

"I saw a guy in the middle of the street on Vine with a gun (above his head) and started shooting," witness Oscar Herrera told NBCLosAngeles.com.

Read complete coverage from NBCLosAngeles.com

Police had few details, but Herrera told Los Angeles television stations that he saw the gunman walking down the middle of Vine Street near Sunset Boulevard, firing at least nine shots into the air and at passing cars while shouting "kill me!" and "I'm gonna die!"

Police officers responded to the busy Hollywood intersection about 10:20 a.m. on a report of a gunman.

The 40-year-old male driver of a Mercedes-Benz was wounded in his upper body and taken to a hospital in unknown condition. A truck and another car were struck with bullets.

The gunman eventually ran out of bullets and pulled a knife before a policeman shot four or five times at the attacker, Herrera said.

He died at the scene, police said.

Dave Pepper told KCAL-TV that he was in his car when the gunman attacked him.

"This guy came running across the street and he put the gun right up to this window," Pepper said as he sat in the car. "Why he didn't pull the trigger I don't know? I thought maybe he was out of bullets."

Investigators were trying to determine a motive for the attack. The area was cordoned off, snarling traffic in the heart of Hollywood, as the gunman's body remained in the street under a white sheet for more than an hour after the attack.

The intersection of Hollywood Boulevard and Vine Street remained closed Friday afternoon. About 2 p.m., traffic was being diverted around the crime scene.

Another witness described the surreal incident as something that might have been staged for a movie.

"When I heard it, I didn't react to it being real," said witness Greg Watkins, who was walking along the street when the shooting began.

"This is Hollywood, and they do film stuff all the time," he told the Los Angeles Times. "I honestly thought they were filming something."

This article contains reporting from NBCLosAngeles.com and The Associated Press.

More news and features on msnbc.com: