A 26-year-old man, who was distraught because his girlfriend broke up their four-year relationship, shot at passing cars in a Hollywood intersection before being gunned down by police on Friday morning.

Tyler Brehm stood in the center of Sunset and Vine streets and fired 12 shots wounding three motorists.

One victim, a 40-year-old music industry executive driving a Mercedes, was critically injured after getting hit in the jaw and was brought to the Cedars-Sinai Medical Centre for treatment. The other two victims suffered minor injuries.

A SWAT team, a plainclothes police detective and an off-duty officer responded to the incident. The officers ordered Brehm to drop his handgun but he pointed it to them so they fired back at him, said police spokeswoman Sgt. Mitzi Fierro, according to CNN. Brehm died in a nearby hospital from bullet wounds.

Before the police arrived, a resident shouted at Brehm from his apartment window daring the shooter to come up to his room in an attempt to distract him. Christopher Johns also took a 5-minute video of the shooting rampage while talking to Brehm, who asked him for ammunitions and to call an ambulance.

Brehm's ex-girlfriend, 24-year-old Alicia Alligood, told myFOXla.com that he had a breakdown after their breakup but she did not know he would turn violent. She only learned on Saturday that he was killed.

Alligood described Brehm as a great person and had known each other since going to the same school in Pennsylvania.