PARIS (Reuters) - The driver who rammed his car into two police motorcyclists in a Paris suburb had pledged allegiance to Islamic State, the French anti-terrorism prosecutor said on Tuesday.

A 29-year-old French man was arrested at the scene of Monday’s attack, which occurred in the suburb of Colombes, in the northwest of the city, and was in custody, the prosecutor’s statement said.

The officers had been stationary and conducting routine checks when they were hit by a black BMW. A police source said both policemen had both their legs broken. One also had his wrist broken and suffered a serious trauma to the head.

A letter containing a pledge of loyalty to Islamic State was found in the suspect’s car, as well as a knife, the prosecutor said. It did not say if he had been formally charged.

The man, who has not been named, was not previously known to intelligence services, according to the department’s statement. A police source said the man had no recent convictions.

A judicial source told Reuters the suspect lived in Colombes, about 500 metres from where the attack took place.

Footage from the scene on the website of daily newspaper Le Parisien showed one police motorbike sandwiched between the crumpled bonnets of a police car and the BMW. Debris from a second bike lay strewn on the road.

France has experienced a wave of attacks by Islamist militants in recent years.

Bombings and shootings on November 13, 2015, at the Bataclan theatre and other sites around Paris killed 130 people, and in July 2016 an Islamist militant drove a truck through a crowd celebrating Bastille Day in Nice, killing 86.