ROME (Reuters) - Italian police said on Thursday they had arrested a man on a tip from the FBI suspected of preparing pipe bombs and a judge’s order said he had been considering an attack on a kindergarten.

Slideshow ( 4 images )

The man, an Italian citizen of Latvian origin, had used social media to praise Sayfullo Saipov, the suspect charged with killing eight people with a speeding truck in New York City last year and perpetrators of other attacks in the United States, according to a police statement and a judge’s order.

The FBI told Italian police about the social media activity, the statement said. A police search of the 24-year-old’s apartment in the city of Viterbo, north of Rome, found material used to assemble pipe bombs.

According to a judge’s detention order seen by Reuters, the man, identified as Denis Illarionovs and born in the Latvian capital, Riga, had written on social media phrases including one that read “it’s time to kill the children in the kindergarten”.

He praised Saipov as “another fallen angel to the Kuffar” (infidel) and also used social media to hail those who had carried out gun attacks that left 15 people dead in Colorado in 1999 and five in Dallas in 2016.

The judge’s warrant said police had found material such as cylinders, solid explosive material, many small coins, metal plates, a digital scale, a digital thermometer, fuses, and an electrical resistor.

They also found an air rifle, two air pistols and weapons used in hand-to-hand combat such as brass knuckles.

The man was arrested on Monday and charged with possession of explosive material. The arrest was made public after the judge approved his continued detention.

A judicial source said the charges against Illarionovs were formulated in such a way that they could promptly be hardened to terrorism offences if prosecutors so decided. If so, the case would be transferred to national anti-terrorism investigators in Rome.

The judge’s order said Illarionovs had been a troubled youth and lived by himself after his mother moved to Germany for work. After his arrest, he exercised his right not to answer questions. The order did not mention his religion.

One of his social media accounts was listed under “Pope Little Pig XVI” and showed former Pope Benedict with a face deformed to make him look like a pig.

Many Muslims around the world criticized Benedict in 2006 after he delivered a lecture in Germany that they said associated Islam with violence. The pope denied it at the time, saying his words were misunderstood.

Saipov, an Uzbek immigrant, was arrested immediately after the Oct. 31 attack in which he plowed a truck down a bike lane on Manhattan’s West Side. Islamic State claimed responsibility for the attack, which was the deadliest assault on New York City since Sept. 11, 2001.

In November, he pleaded not guilty to murder and other criminal charges.