The man was also on the police’s radar before the attack, according to Norway’s domestic security agency, PST, although the organization did not say why.

The attack took place in Kongsberg, a town of about 26,000 people not far from Oslo. The 37-year-old suspect is being held on preliminary charges and will face a custody hearing Friday.

The Danish man arrested for the attack had received previous convictions for burglary and possession of drugs, Norwegian media reported. Regional police chief Ole B. Saeverud also said that the suspect, described as a Muslim convert, had previously spurred concerns that he had been “radicalized.” However, he did not elaborate on the designation.

For more reporting from the Associated Press, see below.

The attack left the country stunned as police released some details, including that officers made contact with the suspect but he initially escaped.

“From what we know now, it is reasonably clear that some, probably everyone, was killed after the police were in contact with the perpetrator,” Saeverud said Thursday. The victims were four women and one man between the ages of 50 and 70. Three other people were injured, police said.

Mass killings are rare in low-crime Norway, and the attack immediately drew comparisons with the country’s worst peacetime slaughter a decade ago, when a right-wing domestic extremist killed 77 people with a bomb, a rifle and a pistol.

People have “experienced that their safe local environment suddenly became a dangerous place,” Norwegian King Harald V said Thursday. “It shakes us all when horrible things happen near us, when you least expect it, in the middle of everyday life on the open street.”

According to police, the suspect in Wednesday’s attack walked around downtown Kongsberg shooting arrows. Police were alerted to the attack around 6:15 p.m. and arrested the suspect about 30 minutes later. Regional prosecutor Ann Iren Svane Mathiassen told the Associated Press that after the man’s arrest, he “clearly described what he had done. He admitted killing the five people.”

PST cited various aspects of the attack to explain its belief that the suspect’s actions “currently appear to be an act of terrorism.”

“Attacks on random people in public places are a recurring modus operandi among extremist Islamists carrying out terror in the West,” the agency said. It said “the most probable scenario” for such an attack in Norway “is an attack carried out by one or a few perpetrators with simple weapon types, against targets with few or no security measures.”

“The investigation will clarify in more detail what the incidents were motivated by,” PST said in a statement.

Svane Mathiassen, the prosecutor, said the bow and arrows were just part of the killer’s arsenal. Police have not said what other weapons were used in the attack. Weapons experts and other technical officers were being drafted in to help with the investigation.

Dozens of witnesses in Kongsberg saw the gruesome events. Erik Benum, who lives on the same road as the supermarket that was one of the crime scenes, told the AP that he saw the escaped shop workers sheltering in doorways.

“I saw them hiding in the corner. Then I went to see what was happening, and I saw the police moving in with a shield and rifles. It was a very strange sight,” Benum said.

The following morning, the whole town was eerily quiet, he said. “People are sad and shocked.”

Both the hospitalized victims are in intensive care. They include an off-duty police officer who was inside the store. Their conditions were not immediately known.

Svane Mathiassen, who is leading the investigation, told Norwegian broadcaster NRK that the suspect will be assessed by forensic psychiatric experts Thursday.

“This is not unusual in such serious cases,” she was quoted as saying.

PST said Thursday that the terror threat level for Norway remains unchanged and was considered “moderate.” The main church in Kongsberg was open to anyone in need of support.

“I don’t think anyone expects to have these kinds of experiences. But nobody could imagine this could happen here in our little town,” parish priest Reidar Aasboe told the AP.