A gunman in central Moscow has shot dead an officer from Russia’s main security agency and wounded at least five others, according to the health ministry, in what the Kremlin is calling an “act of terrorism”.

The attacker in Thursday’s attack outside the Federal Security Service’s (FSB) headquarters was “neutralised”, the agency said in a statement carried by state news agency TASS. Step Vaessen, Al Jazeera’s correspondent in Moscow, confirmed the attacker had been shot dead in a gunfight on the street with FSB agents.

The FSB – the main successor agency to the Soviet-era KGB – said there was only one attacker, who failed to enter its headquarters.

“It’s a shock that an attacker could reach the office here and that he managed to kill an FSB officer,” said Vaessen, reporting from the scene.

“It’s understood he was carrying a Kalashnikov, the famous machinegun, and there are now a lot of questions as to how he could have got so close to the heart of the Russian security services.”

The FSB would not offer further details of the incident, or comment on the attacker’s suspected motives, but it may have been planned to coincide with a speech President Vladimir Putin was making to commemorate Russia‘s Security Services Day, a source close to the FSB told Reuters News Agency.

Putin was himself a KGB agent for 16 years, before leaving the agency to enter politics. He returned to the building five years later, in 1996, as director of the reformed FSB agency.

It's understood he was carrying a Kalashnikov, the famous machinegun, and there are now a lot of questions as to how he could have got so close to the heart of the Russian security services Step Vaessen, Al Jazeera Moscow correspondent

“So far, we have no confirmation of the identity of this person, or his motivations,” said Vaessen. “But it happened just a few hours after President Putin finished his annual press conference. He spoke for more than four hours, and interestingly, he was asked to cite the most distressing moment of his 20 years in government – and he mentioned terrorist attacks, especially the one in 2004 in Beslan, in which hundreds of people, mostly children, were killed.

“That was the most difficult moment in his career, he said, and then just a few hours later, this attack happened at the headquarters of this institution where he worked for 16 years.”

Russian investigators opened criminal proceedings into the murder and attempted murder of law enforcement officers after the incident, the Interfax news agency cited the Ministry of Health as saying.

Later on Thursday, an explosion was also heard in the central area, but it was not immediately clear if this was linked to the earlier attack.