Updated

A protester lit himself on fire Friday outside the Sydney headquarters of Australia’s Department of Immigration, New South Wales authorities said.

Police at the scene initially tried to negotiate with the man, who was believed to be about 30 years old. But he poured gasoline on his body and lit himself on fire.

Officers quickly ran over and sprayed him with a fire extinguisher.

According to police Superintendent David Donohue, the man was “deeply disturbed and upset” and “would have killed himself” if police hadn’t intervened, the Guardian reported.

The man was taken to a local hospital with non-life-threatening injuries. His nationality was not immediately disclosed, and it was not clear whether he was a legal immigrant or an asylum seeker.

“I’m not at liberty to discuss what his issues were, but he was protesting the Department of Immigration,” Donohue said at a news conference.

Last year, a Somali refugee lit herself on fire while in immigration detention in Nauru – an island nation in Micronesia -- and an Iranian refugee died following a similar incident while protesting during a U.N. trip to the island, the Guardian reported.