(CNN) -- A man armed with an automatic weapon fired shots at the U.S. Embassy in Sarajevo on Friday, hitting a police officer before authorities shot and wounded him, U.S. and local authorities said.
The gunman was wounded in the left leg and was not considered seriously injured, said Biljana Jandric, a spokeswoman for Sarajevo's Kosevo Hospital.
Local media said the gunman was a 23-year-old from Sandzak, Serbia. His motives were unknown.
The gunman managed to hit the Embassy building several times, according to a statement from the Embassy. He also shot a police officer assigned to protect the Embassy, hitting him in both kneecaps; the officer later underwent surgery for injuries that were not life-threatening, a police spokesman said.
The Embassy was immediately secured when the shooting began and all of its employees are safe, the statement said.
Bosnia's TV1 broadcast footage of a bearded man in a long dark jacket pacing in front of the Embassy with an automatic weapon. A single shot is heard as the man falls to the ground, and he was later seen moving his head while surrounded by law enforcement officials.
Journalist Samir Krilic contributed to this report.