AMSTERDAM (Reuters) - Dutch prosecutors on Tuesday said they were investigating a possible “terrorist motive” behind the shooting on a tram in the city of Utrecht in which three people were killed and five wounded.

A Turkish-born man, 37-year-old Gokmen Tanis, was arrested after a seven-hour manhunt on Monday by security forces and remained in custody.

Two other men were arrested on Monday and released after being cleared of involvement. A fourth suspect was arrested on Tuesday. “His role is being further investigated,” prosecutors said in a statement.

They described Tanis as the chief suspect.

“Up to this point, a terrorist motive is seriously being considered,” prosecutors said in a statement, citing “the nature of the shooting and a letter found in the getaway car.”

But it remained unclear whether the shooter acted on political beliefs or some personal vendetta. “Other motives are not being ruled out,” the statement said.

Tanis has a history of run-ins with law enforcement. He was convicted for illegal weapons possession in 2014 and for shop lifting and burglary earlier this month.

Slideshow ( 11 images )

He was released from custody on March 1, after having been detained on suspicion of rape, the Utrecht District Court said in a statement released after his arrest on Monday.

He is due to appear in court in July in relation to the rape charge, it said.

Under Dutch law Tanis must be brought before a judge by Thursday but does not yet have to be charged.

The three Dutch victims were identified as a 19-year-old woman and two men aged 28 and 49. Three others, ranging from 20 to 74 years old, were critically injured in the shooting.

Prosecutors said they had so far not been able to establish a connection between the victims and the suspected gunman.

“It’s very sad things like this happen in the world these days,” said Rene van Nieuwenhuizen, an accountant living in Utrecht, a picturesque city of 340,000. “I don’t think it will happen to me but it happens and so people get killed.”

Slideshow ( 11 images )

Tanis had previously been arrested, prosecutors said, but have declined to provide details.

There was no immediate comment from Tanis or any lawyer representing him.

Dutch Prime Minister Mark Rutte convened crisis talks immediately after the incident, which came three days after a lone gunman killed 50 people in mass shootings at two mosques in the city of Christchurch, New Zealand.

Utrecht went into lockdown in the aftermath of Monday’s shooting on a tram just after the morning rush hour.

London, Paris and several other European cities have suffered militant attacks over the past years which have killed hundreds of people and authorities are on high alert.

Flags flew at half-mast on government buildings across the Netherlands on Tuesday in tribute to the victims.