A body is covered by a blanket after a shooting with police in Hollywood, California
A body is covered by a blanket after a shooting with police in Hollywood, California December 9, 2011. Reuters

A gunman opened fire on motorists in the heart of Hollywood on Friday, wounding three people before he was shot to death by an off-duty police officer who had been working on a nearby film set.

The bizarre mid-morning incident, which some witnesses initially mistook for a movie, touched off fear, confusion and panic at the famed Hollywood intersection of Sunset Boulevard and Vine Street.

Police said on Friday night they were still trying to determine why the 26-year-old gunman, whose name was not immediately released, began firing randomly at motorists and pedestrians.

A 40-year-old man who was struck by a bullet while driving through the intersection in a silver Mercedes was listed in critical condition at a local hospital, Los Angeles Police spokeswoman Norma Eisenman said.

Two other men suffered minor injuries, one when he was grazed by a bullet and the other when glass from a car window shattered near his face, Eisenman said. None of the wounded were identified by name.

Eisenman said a plainclothes detective and an off-duty motorcycle officer who was working a security detail on the set of a film in the area were the first to engage the gunman.

He was the one who shot the suspect, Eisenman said of the off-duty officer.

Police said they didn't know which production the officer was working on when he responded to the call.

'THEY'RE SHOOTING AT US'

A spokesman for FilmLA, an agency that coordinates film and television permits in Los Angeles, said the closest movie set was Gangster Squad, a crime drama starring Ryan Gosling, Emma Stone and Sean Penn.

That set was several blocks away from the intersection of Sunset and Vine, the spokesman said, although he could not confirm that the officer had been working there.

Witness Micah Williams told local KCAL-9 TV that he and a friend were walking nearby when the gunman began shooting in every which direction.

Williams said at first he and his friend thought the suspect was part of a movie.

Then the third one ricocheted right by our head and I was like, 'Dude, they're shooting at us', Williams said.

A series of videos taken from a nearby office tower and posted on Twitter showed the gunman, dressed in black pants and a white shirt. walking in the intersection firing what appeared to be a handgun as motorists slammed on their brakes and veered out of the way.

Police were then seen arriving on the scene and running in the man's direction. Several more shots were fired out of the camera's view.

Another brief clip, posted on the Los Angeles Times website, showed the man firing at a black pick-up truck at close range.

Witness Oscar Herrera told local KCBS-TV he saw the shooter fire his gun at several cars traveling near or through the intersection.

Herrera told KCBS that when the suspect apparently ran out of bullets he put the gun into his waistband and took out a knife before he was shot by police.