A police administrator who stabbed and killed four people at Paris’s police headquarters on Thursday was a radicalised Islamist who slit the throat of at least one of his victims, the French anti-terrorist prosecutor revealed on Saturday.

Mickaël H acted with premeditation, buying two knives shortly before the attack on Thursday lunchtime in the centre of the city, and exchanging more than 30 religious text messages with his wife.

France’s national anti-terrorist prosecutor, Jean-François Ricard, said several elements led police to believe it was a terrorist attack and said they had been able to retrace the actions of the attacker “with precision” thanks to CCTV and his electronic pass giving access to the police building.

Three police officers and a police administrator were killed in the attack. A fifth person, also part of the administration team, was gravely injured. The investigation into the “murder and attempted murder of public agents” in connections with a “terrorist organisation” has been handed over to the anti-terrorist brigade.

Ricard said the attacker had arrived for work at the police headquarters at 8.58am on Thursday after taking the suburban train near his home in the north-west suburb of Gonesse. At 12.18pm he left the police complex on the Île de la Cité.

“He went to a shop in the Rue Saint-Jacques and bought two knives. One was a metal kitchen knife 33cm long with a 20cm blade, the other was an oyster knife. Leaving the shop he took a detour and hid the knives he had bought on him,” Ricard told a press conference. He said the attacker’s behaviour during this time “displayed no nervousness”.

After Mickaël H returned to his office, Ricard described how “in circumstances to be established … he mortally wounded with his knife, two victims who were getting ready to go to lunch”. He said that the first victim, a 50-year-old, suffered a large wound to the neck, a second, aged 38, was fatally stabbed several times around the thorax and abdomen.

“The autopsies carried out after these deaths show that it was a scene of extreme violence,” he added. “The attacker then went to another office on the same floor and stabbed a 37-year-old agent several times, two of them fatal. He then tried to go into another office, luckily closed, in which three police staff were having their lunch.”

The attacker then took the stairs and stabbed a 39-year-old police officer, who died of their wounds. At the ground level he attacked a member of the administrative staff, leaving them with serious but non-fatal wounds to the neck.

In the prefecture courtyard, he was challenged by a trainee police officer who tried to reason with him telling him to drop his knife. He told police that the man ignored his appeals and ran at him with the knife, so he shot him twice. “The total length of this killing spree is estimated at seven minutes,” Ricard said.

Ricard said Mikhaël H was 45 and had been born on the French island of Martinique, adding he had been left deaf after suffering with meningitis. He had converted to Islam several years ago, according to witnesses.

He joined the police in 2003, and worked as a computer expert with the surveillance department. He had no criminal record but appeared in court on charges of domestic violence in 2009. “We are now looking into motives and accomplices to this attack,” Richard said.

He said Mikhaël H and his wife, 38, who is being questioned by police as a suspected accomplice, exchanged 33 SMS messages between 11.21am and 11.50am on Thursday. He said the subject matter of these messages were “exclusively religious” and ended with the words: “Allahu Akbar” and “Follow our beloved prophet Mohamed and reflect on the Qur’an”.

“These SMS, if not explicit about any possible attack, nevertheless were sent only 30 minutes before the knives were bought,” Ricard said. He added the attacker was believed to have been in contact with others thought to belong to “a Salafist movement”.

Witnesses have told police the attacker showed signs of radicalisation, notably expressing support for Islamist actions, his reluctance to have contact with women, justification of the 2015 attack on the satirical newspaper Charlie Hebdo and changing his dress several months ago from “western clothing to that suitable for the mosque”.

Ricard said the investigation had become one for anti-terrorist investigators because of “a combination of elements … the premeditated character of the attack, his professed desire to die during the attack, the nature of the attacks and the injuries inflicted on at least one of the victims, the context of latent radicalisation and the exclusively religious message sent before the attack”.