Dutch prosecutors are to charge the suspect in a gun attack in a packed Utrecht tram with “terrorist” killings, saying he will appear for the first time before a judge on Friday.

“The 37-year-old suspect will appear before a judge on Friday, charged with multiple murders with terrorist aims, as well as attempted murder and a terrorist threat,” the public prosecution service said in a statement on Thursday.

Prosecutors and police are still investigating whether the suspect, previously identified as Turkish-born Gokmen Tanis “acted out of a single terrorist motive or whether from personal problems in combination with radicalised ideas,” it said.

Three people were killed and seven others wounded after the shooting rampage on a tram in the central Dutch city.

Tanis was arrested after an eight-hour manhunt that virtually shut down the Netherlands’ fourth-largest city and saw security stepped up at airports and key sites across the country.

Police later arrested a second 40-year-old suspect in the case.

“It’s being investigated whether this suspect played a supporting role in the shooting,” prosecutors said.

Tanis’ first appearance will be behind closed doors Friday where he is expected to be remanded in custody for two weeks before a next appearance.