A man wielding a butcher knife stabbed three people along Sunset Boulevard and inside a Jack in the Box restaurant in Hollywood before police shot and killed him Tuesday afternoon, Los Angeles Police Department officials said.

The attacker, who went on a rampage along Sunset about 2 p.m., also tried to enter a nearby coffee shop, but a customer held its glass door shut, witnesses reported.

Korbyn Gomez, a student at the L.A. Film School near Sunset and Ivar Avenue, said he watched as the attacker approached with a ‘big … bloody knife.”

“He was 15 feet away from me,” Gomez said. “I got away. You could tell he was going to give it to anyone who was near.”

Police responding to an assault-with-a-deadly-weapon call confronted the suspect inside the Jack in the Box, “at which time an (officer-involved shooting) occurred,” said LAPD Officer Sal Ramirez. “The suspect went down and was taken into custody.”

LAPD Sgt. Frank Preciado said the attacker, described as a black man possibly in his 30s, died at the scene from his injuries.

The dead man has not been identified, Preciado said.

• PHOTOS: LAPD officers fatally shoot man after stabbing rampage in Hollywood

The area is a popular one with tourists, and is busy with employees from nearby businesses such as CNN offices and patrons of the ArcLight Theater.

The victims included a man stabbed in the arm as he was riding a bicycle near a liquor store on Sunset Boulevard.

The liquor store owner had just asked a man, who was reportedly sitting outside the business, to leave, Preciado said.

“(The suspect) got up and as soon as he saw the individual on the bicycle, he stabs him,” Preciado said, adding the victim and suspect did not know each other.

A witness, who asked to be identified only as Paul, said he saw a young man bleeding on the sidewalk near the liquor store as people came to his aid.

“It looked like he lost a pretty good amount of blood,” Paul said. “All of the people standing with him were going crazy, like ‘Help! Help!’

Two of the three people injured were transported to hospitals, according to LAPD Officer Sal Ramirez.

• VIDEO: LAPD officers fatally shoot man after stabbing rampage in Hollywood

Police said a taser was used on the suspect before the shooting, adding that surveillance video inside the restaurant would be reviewed as part of their investigation.

CNN reporter Maeve Reston, who works out of the network’s building on Sunset, witnessed some of the chaos, reporting on Twitter that she saw a man trying to stab people.

“Unclear how many stabbing victims there are, but suspect ran down Sunset Blvd. trying to stab people outside our CNN office in Hollywood,” Reston tweeted at 2:19 p.m.