The man who shot dead four people and wounded two others on a tram in Utrecht in March has appeared at a preliminary court hearing.

Gökmen Tanis, 37, is accused of four counts of murder with a terrorist motive. At the start of the hearing he told judges he refused to be represented by a lawyer because ‘I’m not a democrat and I don’t recognise your courts.’

Tanis opened fire on a packed tram near the city’s central station just before 10am on March 18. He was arrested later that day told police he acted alone. The trial is likely to revolve around the issue of whether he was a committed Islamic terrorist or a serial criminal and drug user with diminished responsibility.

Appearing in handcuffs and flanked by six police officers, Tanis refused to stand when the judges entered the courtroom and interrupted them as they outlined the case. When chairman of the judges, Ruud Veldhuisen, referred to ‘the accusations’ against him, Tanis corrected him: ‘Not accusations, I’ve already confessed.’

The prosecution service said Tanis was a known offender who was awaiting trial for rape when he carried out the attack, but there were no indications at that point that he had been radicalised.

However, they added that his behaviour during the attack and statements he made to the police strongly indicated he had terrorist sympathies. ‘I’m doing this for my faith. You are killing my fellow believers,’ he said at one point.

The prosecution said Tanis wrote a message on the silencer of his gun, in what may have been an imitation of Brandon Tarrant, who shot dead 51 people at a mosque in Christchurch, New Zealand, three days earlier.

The court has banned media organisations from recording or broadcasting T’s voice and is using a computer-generated reconstruction of the scenes on board the tram because the live footage is too distressing for victims.

‘It’s not surprising that the people who were on the tram have suffered from anxiety every day since,’ said the prosecutor. ‘Some of them literally had to flee for their lives. It is important for them to know what the motive was.’

Tanis will undergo a psychological assessment at the Pieter Baan Centrum before the next hearing, which is scheduled for September 23. The full trial is expected to take place early next year.