A man armed with a rifle and throwing incendiary devices at a migrant detention centre in Washington state early Saturday morning died after four police officers arrived and opened fire, authorities said.

The Tacoma Police Department said the officers responded at about 4 a.m. local time to the privately run Tacoma Northwest Detention Center, a U.S. Department of Homeland Security detention facility that holds migrants pending deportation proceedings.

The detention centre has also held immigration-seeking parents separated from their children under President Donald Trump’s “zero tolerance” policy, an effort meant to deter illegal immigration.

The shooting took place about six hours after a peaceful rally in front of the detention centre, police spokesperson Loretta Cool said. She said another rally was planned for later Saturday, but it would have to be held in a different area because of the investigation into the police shooting.

Police said the man caused a vehicle to catch fire and that he attempted to ignite a large propane tank and set buildings on fire. Police said that besides the rifle, he had a satchel and flares.

Police said officers called out to the man, and shots were fired.

Cool said all four officers fired their weapons, but she didn’t have specific details of what took place. She said the officers weren’t wearing body cameras, but the area is covered by surveillance cameras from the detention centre. She said she didn’t know if the man fired at the officers.

After the gunfire, officers took cover, contained the area and set up medical aid a short distance away, police said.

Officers then located the man and determined he had been shot and was dead at the scene. His name hasn’t been released.

Authorities say investigators are processing the scene and police are continuing to investigate. No law enforcement officers were injured. The four Tacoma police officers who fired their weapons have been placed on paid administrative leave as is standard in officer-involved shootings.

A motive for the man’s actions hasn’t been determined, Cool said.

‘Misplaced aggression’

GEO Group, which runs the 1,575-bed Northwest Detention Center, in an email to The Associated Press said baseless accusations about how detainees are treated at its facilities “have led to misplaced aggression and a dangerous environment for our employees, whose safety is our top priority. Violence of any kind against our employees and property will not be tolerated. We are thankful for the quick and brave action by the Tacoma Police Department, which prevented innocent lives from being endangered.”

GEO Group said the detention centre in Tacoma has modern amenities with air conditioning, recreational activities, a bed for every individual and medical care available at all hours.

Last year, a federal judge ruled that Washington state could pursue its lawsuit seeking to force GEO Group to pay minimum wage for work done by detainees at the detention centre.

In November, a Russian asylum-seeker who conducted a hunger strike to protest the conditions at the detention centre died by suicide, the Pierce County Medical Examiner’s Office ruled.

Mergensana Amar, 40, was taken off life support after attempting to kill himself while in voluntary protective custody on Nov. 15, U.S. Immigration and Customs Enforcement said.