Officer Sam Lopez turns away protesters near the Northwest Detention Center on Saturday in Tacoma, Wash. After throwing incendiary devices at the center that day, a man armed with a rifle was fatally shot by police, authorities said. (Rebekah Welch/Seattle Times/AP)

An armed man was fatally shot Saturday after throwing what authorities called “incendiary devices” at an immigration detention center in Washington state and trying to set a commercial-size propane tank on fire, according to Tacoma police.

About 4 a.m., 69-year-old Willem Van Spronsen threw “lit objects” at buildings and at cars in a parking lot, police said, causing a vehicle to go up in flames. Court records show the man was arrested last year at a protest at the privately owned detention center, and Immigration and Customs Enforcement called the man an “anti-immigration-enforcement protester.”

The man, a Vashon Island resident, died at the scene after shots were fired, police said.

“This could have resulted in the mass murder of staff and detainees housed at the facility had he been successful at setting the tank ablaze,” Shawn Fallah, who heads the ICE Office of Professional Responsibility, said in a statement. “These are the kinds of incidents that keep you up at night.”

No ICE employees or detainees were hurt, agency spokeswoman Tanya Roman told The Washington Post. The detention center canceled visitations for the day but did not go into lockdown, Roman said. The facility returned to its full operations Sunday.

The attack came as thousands protested at ICE facilities nationwide ahead of the agency’s planned mass arrests of undocumented immigrants on Sunday. The Trump administration has said it will target about 2,000 families for deportation, focusing on as many as 10 cities. Seattle is not among the cities reportedly being targeted.

The Northwest Detention Center on the Tacoma Tideflats is owned and operated for ICE by a private company called the GEO Group, according to the Northwest Immigrant Rights Project, which puts the facility’s capacity at 1,575 — one of the biggest immigration detention centers in the country, the group says. As ICE faces calls to improve conditions for migrants in its custody, some have called on the government to stop using privately run detention centers.

GEO Group spokesman Pablo Paez told The Post that the company is concerned that “outrageous and baseless accusations that have been leveled against our facilities have led to misplaced aggression and a dangerous environment for our employees.”

“Contrary to the images of other facilities on the news, our facilities have never been overcrowded, nor have they ever housed unaccompanied minors,” he said in a statement.

Van Spronsen was arrested at the Tacoma facility in June 2018, court documents show, amid what a prosecutor described as a noisy protest scene that included yelling, banging on pots and pans, megaphones and honking horns.

In that incident, Van Spronsen lunged at a police officer who was detaining a fellow protester at the center, according to a prosecutor’s written account. Van Spronsen wrapped his arms around the officer’s neck and shoulders to free the 17-year-old being held.

Van Spronsen was escorted away through dozens of screaming protesters, the prosecutor wrote. Officers took a baton and a folding knife the man had been carrying.

He pleaded guilty to obstructing a law enforcement officer, court records show.

Deb Bartley, who said she was a longtime friend of Van Spronsen’s, told the Seattle Times she believes he intended to die by attacking the detention center on Saturday.

“He was ready to end it,” she told the Times. “I think this was a suicide. But then he was able to kind of do it in a way that spoke to his political beliefs. . . . I know he went down there knowing he was going to die.”

Bartley said Van Spronsen left a “manifesto” that she did not share details of but thinks will be used by authorities. She and others got letters from Van Spronsen “saying goodbye,” she said.

Loretta Cool, spokeswoman for the Tacoma Police Department, told The Post on Saturday that police did not have any information to share on Van Spronsen’s motives in the attack.

The police department said in a statement that officers responding to Saturday’s incident “called out” to Van Spronsen and that “shots were fired,” but it did not elaborate. Cool said she did not know whether the man killed had fired the rifle he was carrying.

The man had flares on his body, police said. The Pierce County Medical Examiner’s Office reported that Van Spronsen had gunshot wounds, according to the Times.

The officers involved, who were not injured, retreated, and “medical aid was staged” nearby, according to police. After officers approached the man, who seemed to still have his weapon, they found him dead.

The four officers — with experience on the Tacoma police force ranging from nine months to 20 years — have been put on paid administrative leave, according to department policy.

“We are extremely grateful to the officers of the Tacoma Police Department who reacted quickly to the incident that occurred outside the Northwest Detention Center this morning,” Michael Melendez, acting field office director for Seattle Enforcement and Removal Operations at ICE, said in a statement. “This incident could have resulted in the loss of many more lives, were it not for the brave actions of all the officers involved.”

An investigation continued throughout Saturday, police said, and authorities closed roads near the center as they gathered evidence.

“The facility has been operating normally with detainees able to move about inside the building,” the police department said in a statement.

Visitation will resume when roads are reopened, police said. The department plans to release more information after the officers involved have been interviewed. Detectives found Van Spronsen’s house on Vashon Island and searched it for evidence, with help from the Tacoma police and King County SWAT teams.

The closures around the detention center led a group called La Resistencia, which has denounced ICE deportations, to postpone a protest that had been planned for Saturday afternoon at the facility, the Times reported.