A man has been charged with terrorism after he allegedly threw an explosive device at a crowd protesting the celebration of Australia Day in Perth last month. The 31-year-old man was detained after hurling a homemade bomb into a throng of around 2,500 people who had gathered in support of the Aboriginal community. The device, which was filled with ball bearings and screws, failed to explode, but authorities said it could have turned into a 'mass casualty event'.

Australia Day - a national holiday on 26 January - marks the 1788 landing of Britain's First Fleet in Sydney Cove and the start of colonisation. For many Indigenous Australians and their supporters, it is known as Invasion Day.

Police had already charged the man - whose identity has been suppressed by the courts for his safety - with committing an unlawful act with intent to harm and one count of making or possessing explosives under suspicious circumstances. West Australian Premier Roger Cook on Thursday told reporters it is alleged 'the attack on Aboriginal people and other peaceful protesters was motivated by hateful, racist ideology'.

'Thankfully, [the device] did not detonate; but for that, we could have seen a mass casualty event with injuries and potential loss of life,' Cook said.

The fresh charge - which carries a maximum penalty of life imprisonment - is the first time terrorism charges have been laid in the state, police say. Cook stated, 'I know this event has impacted people Australia-wide and it is deeply felt by our Indigenous communities. I know that there is anger. We have every right to be angry.'

West Australian Police Commissioner Col Blanch confirmed that the bomb had a fuse that had been lit, adding: 'It should have gone off.' He mentioned that police had no prior intelligence of the attack and that the man was 'self-radicalised' and acted alone. Investigators found evidence of the man having accessed 'pro-white male, pro-white material online'.

Australian Federal Police (AFP) Commissioner Krissy Barrett indicated that federal police and Asio, Australia's domestic intelligence agency, were called into the investigation shortly after the device was thrown and worked around the clock to establish whether there was any ongoing threat.

The man, who is remanded in custody, is next due to appear in Perth Magistrates Court on 17 February.