A man who was killed in East Hollywood near Silver Lake on Thursday was involved in a dispute at a nearby middle school during a graduation ceremony just before the shooting, officials said.

The shooting victim, 19-year-old Christopher Hernandez, was an older brother of a student at Thomas Starr King Middle School on Fountain Avenue, an LAUSD spokesperson and Los Angeles police detectives told NBC4.

Breaking News Alerts: Download the NBCLA News App

The school ceremony, officially called a "culmination" and open to guests, ended around 10 a.m., an hour before the shooting. The dispute between the man later shot and another young man continued, moving west on Fountain Avenue two blocks to Sunset Boulevard, accordng to LAUSD spokesperson Monica Carazo.

Loud arguing was heard by people in the vicinity.

"They were arguing up on Fountain, then came back down and around up Sunset," said Brian Cresanto, who was in the outdoor yard of a nursery. "It was him (the victim) and a guy on a bicycle, and after that another guy came down."

It's believed that third person was the shooter who opened fire outside a Del Taco fast food restaurant in the 4300 block of Sunset Boulevard about 11 a.m., officials said.

Hernandez was shot while on the sidewalk and went down near the drive-through lane. He was transported, but pronounced dead at the hospital.

Read: City Reaches Tentative Deal With Man Shot At During Manhunt

The gunman fled in a dark sedan, possibly an Infiniti, officials said. It was not clear whether the shooter was at the middle school earlier.

The man at the nursery said family members of the victim, still dressed up for the graduation, were with him on the sidewalk and present when the shots were fired.

"That's all we heard, the boom, boom, boom," said another witness, Hovik Hovnanian.

Cresanto was closer and saw a young girl with the victim after he went down. "The sister was screaming," Cresanto said.

Whatever dispute may have occurred earlier at the middle school was not apparent to Principl Mark Naulls and did not disrupt the ceremony, he said.

"People were taking photographs afterwards," said Naulls. "I didn't see anything that would hint that there was any type of a conflict."

The some 160 eighth grade film and media academy graduates and their guests had left the campus before administrators were notified of the shooting two blocks away. Some 1,500 hundred students were still on campus, which was placed in lockdown for 40 minutes, Naulls said.

Sunset Blvd between Fountain and Hillhurst avenues was kept closed as a crime scene until after 4p Thursday afternoon.

Clearing the scene, LAPD Northeast area detectives said they are still investigating whether there is a connection between the initial dispute at the school and the shooter.

Police said the shooting may have been gang-related. No students were hurt during the incident.

Christina Cocca contributed to this report.