Thousands of people, many carrying red and white flowers to match the colors of the city's flag, walked to the scene of Monday's attack to commemorate the three people killed and three others who were seriously injured in the shooting.
Dutch Prime Minister Mark Rutte, who was among the walkers, said he was "very sad and at the same time proud that we can do this together and show that we will never, never surrender to violent extremism."
The shooting is being investigated as a possible extremist attack, but prosecutors would not say if the suspect, Gokmen Tanis, has said anything about his motive. "The 37-year-old suspect this morning confessed the criminal acts he is charged with" at a hearing before an investigating judge, the public prosecutor's office said.
Prosecutors did not elaborate on the confession and said the gunman's motive remains under investigation. Tanis, a Utrecht resident of Turkish descent, was arrested hours after the shooting and is being held on charges including multiple murder or manslaughter with terrorist intent for the deaths of two men and a woman.
The victims included a father who trained youth teams at a local soccer club and a woman who worked in a cafe in a nearby town. Prosecutors have said the suspect, who has a long criminal record, did not know any of those who were shot on the tram. They say the nature of the shooting and a note found in a getaway car led to strong suspicions of an extremist motive.
The team investigating the shooting has asked a forensic psychiatry and psychology institute to carry out a personality test on the suspect. At Friday's behind-closed-doors hearing, an investigating judge extended Tanis' detention by two weeks so that investigations can continue. In a statement, the court said the judge ruled that "the suspicion is strong enough to detain the man for longer."
A 40-year-old man who was detained a day after the shooting because Tanis was arrested at his home has been released without charge after no evidence was found that he had helped Tanis in the shooting, prosecutors said.
Utrecht Mayor Jan van Zanen said at the start of the evening's silent procession that one of the three seriously injured victims was improving, "the other two, sadly, not yet." Virgil van Dijk, captain of the Netherlands' soccer team, which was staying near Utrecht to prepare for a match Sunday night, tweeted: "Although we are not walking with you this evening, 10 kilometers away we are standing still for the terrible events of Monday."
Several people carried a long red banner emblazoned with white letters spelling out, in Dutch, "Utrecht never bows."
Corder reported from The Hague, Netherlands.