German police fatally shot a man during an exchange of gunfire near the Israeli consulate and a Nazi history museum in Munich on Thursday, according to state Interior Minister Joachim Herrmann.

"Due to the intervention of the police, the perpetrator was stopped," Herrmann informed reporters. A spokesperson for the police in the Bavarian state capital revealed that the man was armed with a "long-barrelled gun," which turned out to be an old rifle.

The incident took place on the anniversary of the 1972 attack at the Munich Olympics, where Palestinian militants killed 11 Israeli athletes. The motive behind the gunman's actions on Thursday was not immediately clear, but Herrmann stated that police would investigate whether there was any connection to the anniversary.

Reports from The Standard newspaper and Spiegel news outlet identified the suspect as a teenage Austrian national who had recently traveled to Germany and resided in the Salzburg area near the border with Bavaria.

Munich police declined to comment on these reports and stated that they were not currently disclosing information about the suspect. The Israeli foreign ministry confirmed that the consulate was closed on Thursday for a commemoration of the massacre, and no staff members were injured in the incident.

The museum and research institute, which focuses on the history of Germany's 1933-45 Nazi regime, is situated near the Israeli consulate in Munich's Maxvorstadt neighborhood. German Interior Minister Nancy Faeser characterized the exchange of fire as a serious incident, emphasizing that "the protection of Israeli facilities has top priority."

The shooting occurred amid heightened political polarization in Germany. On Sunday, the anti-immigrant Alternative for Germany (AfD) became the first far-right party to win a regional election since World War Two. Israeli President Isaac Herzog stated that he had spoken with his German counterpart.

"We expressed our shared condemnation and horror at the terror attack this morning," Herzog posted on X, adding that on the day of remembrance for the Olympics massacre, "a hate-fuelled terrorist came and once again sought to murder innocent people."