Officer K. Needham, left, and Sergeant Syme confer with each other outside of the closed Union Square Park after a bomb threat caused law enforcement to seal off the premises from the public October 17, 2013 in downtown San Francisco, Calif.

Photo: Leah Millis, The Chronicle

Officer K. Needham, left, and Sergeant Syme confer with each other...

Image 4 of 4

Officer L. Colin transports a paper bag containing unknown items out of the closed Union Square Park after a bomb threat caused law enforcement to seal off the premises from the public October 17, 2013 in downtown San Francisco, Calif.

San Francisco police closed off Union Square for nearly two hours Thursday after an officer found what he deemed to be a suspicious backpack.

The officer found the unattended backpack on the Stockton Street side of the park at 11:47 a.m., said Officer Albie Esparza, a police spokesman.

After evacuating the square, issuing a shelter-in-place order for nearby businesses, closing streets and calling in the bomb squad, police concluded that the backpack was harmless. They reopened the square at 1:35 p.m.

"It's better to be safe than sorry," Esparza said. "We take these incidents really seriously."

Among those forced from the square were runners picking up their bibs for Sunday's Nike Women's Marathon. The event's tent was set up in the square.

For some, the threat conjured reminders of the Boston Marathon bombings in April, which killed three people.

"I hadn't worried about it until they mentioned this bomb threat," said Eileen Gapasin, 29, of Cupertino. "It's going to be crazy to see what they do for the marathon. ... It's scary to think of the possibility, especially because it's supposed to be a positive experience."

Esparza said the marathon was one of the reasons officers responded as they did.

"Because of the Nike event, we wanted to make sure we were extra careful," he said.