THE HAGUE — A Dutch court on Friday convicted a radicalized Muslim man of murder with a terrorist motive and sentenced him to life imprisonment for opening fire on a tram, killing four people and wounding five others, in March last year.

Judge Ruud van Veldhuisen said the man, Gokmen Tanis, 38, had carried out a “cold blooded” terrorist attack that sent shock waves through the central city of Utrecht and the rest of the Netherlands.

Mr. Tanis did not answer questions during his trial and was repeatedly removed from court for insulting the judges, his lawyer and the families of the victims. The authorities said that he had confessed to the attack and had acted alone. A native of Turkey, Mr. Tanis has lived most of his life in the Netherlands and was reportedly facing a rape charge at the time of the shooting.

After the shooting, the police conducted house-to-house raids and arrested Mr. Tanis eight hours later.