Austrian police arrested a man suspected of carrying out two attacks on high-speed trains in Germany.

The man, believed to be an "Islamic State" supporter, is suspected of having committed attacks on the high-speed rail line between Nuremberg and Munich in October and in Berlin in December, Bavarian State Criminal Police Office said Wednesday.

Austria's Kronen Zeitung reported that elite police raided the 42-year-old's apartment in Vienna on Monday.

In the October attack, a thick wire was stretched across the tracks. It failed to cause any major damage. In December, a similar attack was reported near Berlin, which managed to crack the windshield of a train.

An IS flag and Arabic notes were found near the unsuccessful attacks. Austrian media said investigators were able to trace the printer used to print the texts, leading them to Vienna.

The public prosecutor's office in Vienna identified the suspect as an Iraqi father of five, who was granted refugee status about 20 years ago.

He reportedly glorified Islamist terror attacks, including the one in Nice, on Facebook. The Kurier newspaper reported he called for revenge for the right-wing radical attack in New Zealand.