A man attempting to assemble a shotgun on the streets of San Francisco knocked a police officer unconscious Sunday evening, leaving the cop with a concussion, before the man was arrested, officials said.

Officers responded to reports of a man, later identified as 23-year-old transient Joshua Boling, trying to put together a shotgun in front of a restaurant on the 1700 block of Octavia Street around 10:30 p.m., said Officer Grace Gatpandan, a police spokeswoman.