MOSCOW — Shooting erupted near the fortresslike headquarters of Russia’s Federal Security Service in central Moscow on Thursday evening, the spy agency reported in a series of statements that also said one of its agents had been killed.

The agency, known by its Russian acronym F.S.B., said an “unknown person opened fire” near the headquarters and had been “neutralized.” The assailant’s identity and motive were not immediately clear.

The Izvestia news site said that Thursday’s shooting broke out in the reception area of the headquarters, known as the Lubyanka, and that up to three people had been killed, at least some of them F.S.B. employees. The Interfax news agency quoted the Health Ministry as saying five people were wounded in the shooting and had been “provided with medical aid.”

The shooting was highly unusual for a heavily guarded area that is home to the vast headquarters of the F.S.B. — the main successor to the Soviet-era K.G.B. — as well as to many other government buildings.