“We don’t know the motivation of the 15-year-old,” said the New South Wales deputy police commissioner, Catherine Burn. “What we are investigating is a terrorism offense,” she said, adding that investigators suspect the boy had been influenced, either ideologically or politically, to kill.

It was not clear how the boy might have been connected to those arrested Wednesday in the case. The four were all male and from Sydney’s northwest suburbs, ranging in age from 16 to 22, the police said. A fifth man was detained on a fraud warrant and later released.

The police also visited a mosque in Parramatta where it was believed the boy worshiped, according to local news reports. On Tuesday they also reportedly visited his school, where another youth was questioned about his posts on social media and later arrested and charged with assaulting the police.

Andrew Scipione, the police commissioner of New South Wales, said the 15-year-old had no criminal record.