Dutch counterterrorism police prepare to enter a house after a deadly shooting on a tram in Utrecht, Netherlands, on March 18. (Peter Dejong/AP)

The shooting, coming three days after an attack on mosques in New Zealand killed 50 worshipers and left 40 injured, set off alarms in Europe. Dutch authorities unleashed a massive emergency response even as the extent of the attack and its motivations remained unclear.

“Our country has been hit by an attack in Utrecht,” Dutch Prime Minister Mark Rutte told reporters after a meeting of his top security advisers. “An act of terror is an attack on our civilization, on our tolerant and open society. If this indeed turns out to be a terrorist act, then only one answer is appropriate, and that answer is that our rule of law, our democracy, is stronger than terrorism and violence.”

Local media reported that ambulances rushed to the area where the attack took place, near the 24 Oktoberplein, a busy intersection in southwest Utrecht. Authorities also closed off a lane of a busy highway to make it easier for emergency vehicles to speed in.

The attack appeared to cause some confusion among Dutch authorities scrambling to respond to a burst of violence in a turbulent period. Officials said at first that nine people were injured, then revised the number downward; they also offered contradictory statements about whether there were multiple shooting sites before agreeing there was only one.

Utrecht residents were urged to stay inside for much of the day. By late afternoon, city authorities told them they could again go out, although it was not immediately clear why authorities believed the security threat had diminished.

Witness accounts of the attack were somewhat contradictory, with at least one witness saying that a woman on the tram appeared to have been targeted. Others told local media that an attacker sprayed fire more indiscriminately inside the tram.

One witness quoted by the NRC newspaper said a man got up on the tram and started shooting with a “big pistol.”

“He shot around him, but seemed to be aiming at people sitting on the benches. Everybody ducked away,” said the witness, who NRC said spoke on the condition of anonymity. “The conductor did not open the doors immediately. Two boys next to me kicked in a window, so I jumped outside. Several people did that.”

Authorities, uncertain about the motive for the attack and nervous given that the perpetrator or perpetrators remain at large, also increased security across the country. In Rotterdam, police said they were boosting security at mosques and at train stations. In the Dutch seat of government, The Hague, the military police who patrol government buildings were carrying their rifles at the ready, a different posture than normal, according to Dutch media.

The attack came shortly before provincial elections scheduled for Wednesday. Rutte and most major parties suspended campaigning after the attack.

All mosques in Utrecht were closed after the incident, according to a spokesman for the Ulu Mosque, Utrecht’s biggest, who was quoted by the ANP news agency.

Utrecht police roped off much of the Trumanlaan area of Utrecht on Monday afternoon, local reporters said, in a large-scale operation that appeared connected to the attack. Police said a red Renault Clio had been stolen Monday morning shortly before the incident, then found later elsewhere in the city. Authorities said the carjacking was connected to the attack, but they did not explain how.

Amar Nadhir in The Hague contributed to this report.