Belgian police and forensic experts carry bags with evidence from a terrorist suspect's house in Brussels on Wednesday. (Stephanie Lecocq/European Pressphoto Agency)

An attempted terrorist bombing at a central Brussels train station “could have been far worse,” Belgian Prime Minister Charles Michel said Wednesday, hours after a nail-packed bomb failed to fully detonate in the crowded rail hub.

Prosecutor Eric Van der Sypt said the attacker in Tuesday night’s incident was a 36-year-old Moroccan who lived in Brussels. The man, identified only by his initials, O.Z., was known to police but had no previously discovered terrorist ties, the prosecutor said.

Authorities who searched his house Wednesday said they found materials that could be used to make bombs and suggestions that he had sympathies for the Islamic State.

He was shot dead after he shouted “Allahu akbar!” — Arabic for “God is great” — and tried to attack a soldier in the station, Van der Sypt said. No one else was hurt.

“We have avoided an attack that could have been far worse,” Michel told reporters after convening his security advisers, calling on Belgians “not to let ourselves be intimidated.”

The attacker first attempted to detonate his bag, setting off a “partial explosion” as he ran toward a group of people in the mezzanine level of the station that descends to the tracks, Van der Sypt said.

The bag caught fire, and the attacker dropped it and ran toward the tracks. Then the bag exploded “more violently,” Van der Sypt said, but it still failed to fully ignite the canisters of gas that were contained within. Nails were also packed into the bag, he said. The attacker was not wearing an explosives-laden belt, Van der Sypt said, contrary to an initial eyewitness account from a railway official.

The attacker lived in the Brussels area of Molenbeek, which was also home to several of the men involved in the November 2015 attack in Paris that killed 130 people and the March 2016 attack in Brussels that claimed 32 victims at the Brussels airport and a subway station.

After Wednesday searches of the attacker’s residence in Molenbeek, the prosecutor’s office said that “he probably made the bomb there.”

The attempted attack came on a continent that has been hit repeatedly by terrorism in recent weeks. Just Monday, there was a failed car attack on the Champs-Elysees in Paris. Earlier this month, there was an attack in London.

But Belgian authorities left their national terrorism threat level unchanged, indicating they do not believe another attack is imminent.

Public transportation was reopened Wednesday morning. And a concert by Coldplay expected to draw large crowds Wednesday evening was to be supplemented with extra security.

Elsewhere in Europe, there was ongoing concern about Islamic State threats. Spain’s Interior Ministry said Wednesday that authorities detained a suspected member of the Islamic State and two other Moroccan citizens. The suspect possessed manuals about suicide attacks and is believed to have been in contact with members of the Islamic State in Syria and Iraq, the ministry said in a statement.