A police standoff with an armed and suicidal man led authorities to evacuate San Francisco's Civic Center and a nearby public square on Saturday as negotiators tried to talk him down.

The man called 911 around noon to say he was going to harm himself and any officer who comes close to him, police spokesman Carlos Manfredi said.

Negotiators who made contact with the man at United Nations Plaza reported seeing a handgun in his pant pocket, he said.

They began talking to the man, who appears to be in his 40s, as the area around City Hall was emptied of pedestrians and motorists.

"So long as he stays where he is and keeps talking to our crisis negotiators, then there's hope. We're trying to see how we can resolve this peacefully," Manfredi said.

Police were also trying to talk to the man's family to understand his mental history, he added.

The standoff caused traffic to back up in the area around City Hall.