A man was critically injured Tuesday night when two groups exchanged gunfire near Fifth and Market streets in downtown San Francisco, police said.

Officers responded to reports of a shooting on the 900 block of Market Street about 7:50 p.m. The victim, who was not identified, was found suffering from a gunshot wound and taken to a nearby hospital, said Officer Gordon Shyy, a Police Department spokesman.

Police said the victim ran into the Westfield San Francisco Centre mall after he was shot.

A Nordstrom Rack security guard, who asked to remain anonymous, said he heard three shots ring out about 7:45 p.m., but didn't see the shooting.