German police have shot dead an 18-year-old gunman in Munich in an exchange of fire close to the Israeli consulate, prompting politicians to stress the importance of protecting Israeli sites in the country.
Police said the man, an Austrian national, fired shots from an old carbine rifle with a bayonet in Munich's Maxvorstadt district, near the consulate and a Nazi history museum, before being killed in a shootout with five officers.
The incident occurred on the anniversary of the 1972 attack at the Munich Olympics in which Palestinian militants murdered 11 Israeli athletes. "There may be a connection between the two," Bavarian state Premier Markus Soeder told reporters, adding that this was being investigated.

The gunman is said to have been known to security authorities as an Islamist, Austria's Standard newspaper and Germany's Spiegel news outlet reported. Munich police declined to comment on that report and said they were not currently sharing information about the gunman.
A police spokesperson said the teenager was an Austrian citizen thought to be resident in Austria, without giving further details. He had recently travelled to Germany and lived in Austria's Salzburg area, the Standard and Spiegel said.
The Israeli foreign ministry said its Munich consulate was closed today for a commemoration of the 1972 Olympics massacre and no one from the consulate staff was injured in the incident.
The museum and research institute focuses on the history of Germany's 1933-45 Nazi regime.
German Interior Minister Nancy Faeser described the exchange of fire as a serious incident. "The protection of Israeli facilities has top priority," she said.
"We don't know all the background yet. What we do know leaves us in shock," said Josef Schuster, head of Germany's Central Council for Jews.
The shooting came at a time of heightened polarisation in Germany's political climate. On Sunday, the anti-immigrant Alternative for Germany (AfD) became the first far-right party to win a regional election since World War Two.
Politicians are also debating how to prevent violent crime following a spate of attacks, most recently in the north western city of Solingen where three people were fatally stabbed by a Syrian asylum seeker at a festival last month.
Israeli President Isaac Herzog said he had spoken to his German counterpart about the incident in Munich.
"We expressed our shared condemnation and horror at the terror attack this morning," Mr Herzog posted on X, adding that on the day of remembrance for the Olympics massacre, "a hate-fueled terrorist came and once again sought to murder innocent people".
In October 2019, a gunman who had denounced Jews opened fire outside a German synagogue in the eastern city of Halle on Yom Kippur, the holiest day of the Jewish year, killing two people.