SYDNEY, Australia — He traveled abroad, visiting places where extremists once killed civilians in cold blood. He appears to have posted radical opinions online. He moved overseas, applied for gun licenses and is believed to have purchased several assault rifles.

But Brenton H. Tarrant escaped the attention of the authorities both in Australia, where he was born and spent most of his life, and New Zealand, where he relocated in recent years and is alleged to have assembled his arsenal. He now stands accused of killing 51 Muslims at two mosques in Christchurch last March.

He pleaded not guilty to 92 counts last week including murder and terrorism, and a trial has been scheduled for May. In the long months until then, Australia and New Zealand will continue to grapple with a difficult question: Could the massacre have been prevented?

Or, more pointedly: Have Australia and New Zealand neglected the threat of right-wing extremism as they have overwhelmingly focused on the peril of Islamist terrorism?