Police say the suspect, 37-year-old Gokmen Tanis, has been taken into custody after an hours-long manhunt.
The city was put into lockdown after the shooting, shortly after the Monday morning rush hour, which authorities initially said was an apparent terrorist attack.
Police conducted raids in several locations after issuing an image of Tanis and warning the public not to approach him.
But hours after the shooting, the gunman’s motive remained unclear. A prosecutor said it could be for “family reasons” and Turkey’s state-run Anadolu news agency, quoting relatives of the gunman, said he had fired at a relative on the tram and had then shot at others who tried to help her.
Authorities had raised the terrorism threat in Utrecht province to its highest level, schools were told to shut their doors and paramilitary police increased security at airports, other vital infrastructure and at mosques.
The threat level was reduced by one notch after the suspect was arrested.
The national counter-terrorism agency “reduced the threat level for the province of Utrecht to level 4. Motive is the arrest of the main suspect of the shooting,” it said.
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.
“Our country has today been shocked by an attack in Utrecht … a terrorist motive cannot be excluded,” Rutte said earlier.
“The first reports have led to disbelief and disgust. Innocent people have been struck by violence … we are now doing everything we can to find the perpetrator or perpetrators as soon as possible.”
The suspect had previous run-ins with law enforcement and had been arrested before, regional prosecutor Rutger Jeuken said on Monday without giving further details.
The shooting took place in a quiet residential district on the outskirts of Utrecht with a large immigrant population.
Witness Daan Molenaar, who was on the tram, told national broadcaster NOS he did not believe it was a terrorist attack.
“The first thing I thought was, this is some kind of revenge or something, or somebody who’s really mad and grabbed a pistol,” he said.
Dutch television showed counter-terrorism units surrounding a house in Utrecht and sniffer dogs being put to work.
Utrecht, the Netherlands’ fourth largest city with a population of around 340,000, is known for its picturesque canals and large student population. Gun killings are rare in Utrecht, as elsewhere in the Netherlands.
Want to comment?
Send us an email, making it clear which story you’re commenting on and including your full name (required for publication) and phone number (only for verification purposes). Please put “Reader views” in the subject.
We’ll publish the best comments in a regular “Reader Views” post. Your comments can be brief, or we can accept up to 350 words, or thereabouts.
InDaily has changed the way we receive comments. Go here for an explanation.
Make your contribution to independent news
A donation of any size to InDaily goes directly to helping our journalists uncover the facts. South Australia needs more than one voice to guide it forward, and we’d truly appreciate your contribution. Please click below to donate to InDaily.