Belgian police have shot dead a man who killed two Swedish nationals in the capital, Brussels, on Monday evening.
The 45-year-old man, named in Belgian media as Abdesalem, was shot in a café in the Schaerbeek neighbourhood.
A third Swedish citizen was seriously injured in the attack, which took place 5km (3 miles) from the stadium where Belgium was playing Sweden to qualify for the Euro 2024 football tournament.
The victims are all men in their 60s and 70s, Swedish officials said.
The attack began at 19:00 (17:00 GMT) on Monday, when a man opened fire with an automatic rifle on the Boulevard d'Ypres - north of the city centre.
Videos shared online showed a man on a scooter, dressed in an orange fluorescent jacket, pull up and start shooting passers-by.
He then chases people into the hallway of an apartment building to gun them down. Four gunshots can be heard.
Shortly after the attack, he filmed himself admitting to the killings.
In the video, the Arabic-speaking gunman refers to fighting for God and says he has killed Swedish people.
The suspect was tracked down on Tuesday morning following an overnight manhunt, during which France also stepped up security measures at the Belgian border.
He was found after a witness informed the police that he had seen the suspect in a café near his accommodation in Schaerbeek, north of Brussels, and that he was carrying a military weapon and a bag of clothes.
The suspect was shot in the chest and sent to hospital, where he received intensive care treatment but died from his wounds.
He is believed to be a Tunisian man who was in Belgium illegally, after his asylum application was rejected in 2020. Sweden's prosecutor's office said it believes he was inspired to commit the killings by the Islamic State (IS) group.
Belgian Interior Minister Annelies Verlinden said the automatic weapon found on him was the same as the one used in the attack.
The country's threat risk was raised to four, its highest level, following the killings. This was lowered to three on Tuesday after the authorities assessed that the imminent threat had disappeared following the suspect's killing.
Belgian prosecutors initially said there did not appear to be any links between the attack and the Israel-Gaza war, but later said they could not exclude that possibility.
Prime Minister Alexander De Croo called the shooting "a harrowing act of terrorism" in a press conference and prosecutors said the victims were probably targeted because they were Swedish.
The Swedish authorities have urged their citizens in Belgium and abroad to be vigilant.
"Everything suggests this is a terror attack targeted at Sweden and Swedish citizens," said the country's Prime Minister Ulf Kristersson.
He later wrote on X, formerly Twitter, that he would travel to Brussels on Wednesday to attend a ceremony commemorating the victims alongside Mr De Croo.
"Sweden and Belgium mourn the victims of yesterday's attack together," posted the Belgian leader.
The Euro 2024 qualifying match in which Belgium was playing Sweden was abandoned at half-time for security reasons. Some 35,000 supporters had to wait for hours in the King Baudouin Stadium before being evacuated.
Despite the gunman being killed, some people in Brussels and elsewhere in Europe said they are nervous about the threat of more attacks.
"I'm scared," Latifa, a local resident, told the BBC. "I don't feel safe. When I saw the police here, I felt relief."
Top asylum official Nicole de Moor said the suspect, who applied for asylum in November 2019 but was rejected the following October, had gone off the radar.
In February 2021, he was removed from the national register and a month later was ordered to leave the country.
Justice Minister Vincent Van Quickenborne said the man was considered a threat to national security, suspected of human trafficking and known to police in connection with people smuggling.
Sweden raised its threat alert to the second-highest level in August after a series of Quran burnings, which triggered protests and condemnations by several Muslim-majority countries.
The captain of Sweden's football team, Victor Lindelof, wrote on X that he was "shocked and devastated" by Monday night's attack.
France's interior minister said in a radio interview that security would be doubled for Tuesday night's football match between France and Scotland in the French city of Lille, which is roughly 100km from Brussels.
UEFA said a moment of silence would be observed at all Euro 2024 qualifying matches on Tuesday, in memory of those killed in Brussels.
Meanwhile in France on Tuesday, an anti-terror prosecutor said that a man who fatally stabbed a teacher at a school in the northern city of Arras last week declared allegiance to IS before the attack. There is no suggestion this was directly connected to the Brussels incident.