We spoke with a man who saw the suspect moments before the shooting. It happened near the entrance of the park.
"Literally he was eating a burrito and my dog started running toward him," said witness Robin Bullard.
Bullard says he called his dog off when he realized that man eating a burrito in Bernal Heights Park was wearing a holster with a gun.
"I immediately though that maybe he's afraid of dogs, maybe that's why he's carrying a gun," he said.
Bullard said the man did not appear threatening. He describes the man as about 25-years-old and wearing a San Francisco 49ers jacket.
"So I go down the hill and I go around the corner and there's some of my neighbors who are waiting and saying, did you see the guy with a gun, did you see the guy with the gun, we called the cops," said Bullard.
Minutes later police officers arrived. But when they approached the man, Deputy Chief Lyn Tomioka says he raised his gun.
"It does appear he drew his weapon and officers responded and shot him," Tomioka said.
"We heard like probably five seconds of gunfire," Bernal Heights resident Noah Tsutsui said. "Really erratic pop pop pop pop pop. Probably from multiple weapons."
Tsutsui heard about a dozen shots. He lives a block away from the park.
Police haven't said if the suspect fired his weapon.
This park is scenic and normally quiet and safe.
"It's quite scary that someone's carrying a gun in the park and the neighborhood that we live and that he was shot and killed," Bernal Heights resident Matt Kovinski said.
Police Chief Greg Suhr plans a community town hall meeting next week to talk about the shooting.
Shortly after the shooting, protesters against police brutality came out in San Francisco's Mission District.
Around 10 p.m., police received word of the protest in the area of Division and Bryant streets. They found a small group of protesters marching toward the Hall of Justice.
During the march, officers lined up on Bryant Street. Several police cars were vandalized with graffiti.
Protesters eventually left the Hall of Justice and marched toward the Mission District.
No word yet on injuries or arrests.