In just the past two weeks, federal authorities announced the arrests of two US citizens accused of planning ISIS-inspired terror attacks on American soil and charged a third US-born ISIS sympathizer with new crimes.

One allegedly planned to drive a stolen U-Haul van into crowds in a popular marina area just outside Washington, DC; the second was said to be plotting to attack a synagogue, government building, or gay club in Montana, where he had relocated from New York because it was easier to get guns.

These aren’t isolated incidents—even as terrorism drops around the world, the US faces a groundswell of domestic terror threats from right-wing extremists, ISIS supporters, and others.

“Increasingly we are seeing individuals in search of an ideology that justifies their violent desires,” DHS assistant secretary of threat prevention Elizabeth Neumann said in February. “We have a generational problem with violence.”

This past week’s purge of top leadership by the White House at the US Department of Homeland Security (DHS), will make it even harder to keep the country safe, say terrorism experts, congressional aides, and former security officials. Donald Trump’s firing of DHS secretary Kirstjen Nielsen was followed by a rash of departures that has rattled the agency and left it without over a dozen “senior leaders” by the agency’s own count; more could follow.

The president has created a “completely unnecessary and unacceptable security risk,” by “dismantling the leadership of the Department of Homeland Security to attempt to get his way,” said Bennie Thompson, a Mississippi Democrat and chairman of the House Committee on Homeland Security, in a statement. “The president has no business playing politics with our homeland security. DHS is a critical national security department charged with keeping the country safe and secure.”

DHS isn’t the only US agency that fights terrorism: The FBI is the country’s lead investigative agency on terror cases, the Department of Defense tackles foreign terror groups overseas, and local and state law enforcement are also deeply involved. But DHS is the only US agency created specifically in response to terrorism. Its founding mission—”protecting the American people from terrorist threats“—officially remains its “highest priority.”

The ISIS extremist threat

Trump has declared the ISIS caliphate in Syria “100% defeated.” But Americans should continue to expect domestic attacks inspired by ISIS, as a 34-page White House document published in October and signed by Trump warns.

American ISIS sympathizers have started to focus more on domestic terror plots, Seamus Hughes, a terrorism researcher and director of the Program on Extremism at George Washington University, told Quartz, because traveling overseas to join the largely dismantled caliphate is no longer a realistic option. “In addition to the deadly consequences of that increased shift,” he said, “it also makes law enforcement’s job more difficult because building a case on domestic plotting is harder and more involved than the overt act of buying a ticket and traveling to the airport.”

The concerns come as the US has seen an overall rise in terror attacks. The recent ISIS-related arrests are overshadowed by growth in right-wing extremist attacks.

DHS: Chaos at the top

DHS was created specifically to prevent terrorism plots like the Sept. 11, 2001 attacks that killed nearly 3,000 people after federal immigration, airport security, and intelligence-sharing failures. The mega-bureaucracy, created from 22 agencies, now has 229,000 employees and a nearly $50-billion annual budget. Under Trump it has become dangerously focused on stopping poor asylum seekers and refugees from entering the US, former officials warned.

The purge of top officials weakens it further. Nielsen was forced out April 7, the head of the Secret Service was fired April 8, acting DHS deputy Claire Grady quit April 9, the head of Immigration and Customs Enforcement left April 10, and the futures of the general counsel and head of US Citizenship and Immigration Services are in doubt. Thanks to Trump’s refusal to put forward permanent nominees for dozens of positions across the US government, DHS also lacks a head for it Federal Emergency Management Agency and top directors for strategy, management, and finance.

DHS’s office of terrorism prevention is also led by an acting head, David Gersten. Former and current DHS officials say there’s no guarantee that Neumann, the head of threat prevention and a close ally of Nielsen’s, will remain.

Former DHS officials are sounding alarms. “The country is facing some very serious threats including cybersecurity, hate crimes, a humanitarian crisis at the border, a major evolution in international terror groups, foreign fighters from Syria relocating in other countries, Russia flexing its muscles, and a Russian military presence in Latin America,” John D. Cohen, former acting undersecretary for intelligence and analysis, told Quartz. “You can’t effectively deal with those issues by having a large chunk of your leadership there in an acting state.”

After the Boston Marathon bombing in 2013, DHS swung into action, said Cohen, who then was counterterrorism coordinator. Within hours, the DHS “counterterrorism board,” which included the heads of ICE, the Secret Service, and DHS’s Office of Intelligence and Analysis, among others, held a secure conference call to discuss what agents on the ground were hearing and what to tell local law enforcement to look for.

The counterterrorism board was created so “to achieve an accurate understanding, not filtered by politics, of what were the highest-risk threats facing the US,” Cohen said. “Our job was to make sure the secretary understood that and that we had a plan to deal with it.”

Today, DHS plays a minimal role in specific terrorism cases unless a suspect crosses a border or gets on a plane or other transport that DHS oversees, a department spokesperson told Quartz when asked about the recent arrests. In some respects within the counterterrorism space, the agency acts like a “dating coach,” connecting local law enforcement with resources and information on radicalization, the spokesperson said.

Acting officials are just as empowered as permanent ones to make important decisions, the DHS spokesperson said in response to the criticism about vacancies.

Inspired by the Nice truck attack

Prosecutors say Rondell Henry of Maryland, 28, planned to use a stolen van to run down shoppers at National Harbor, a popular Washington, DC-area attraction, according to court records unsealed last week. Henry, a computer engineer with no weapons training, allegedly was inspired by the 2016 terror attack in Nice, France that killed 84 people and for which ISIS claimed credit. He intended to “commit mass murder, in the pattern established by ISIS,” according to a motion filed by the US government.

Henry broke into a boat so he could wait “until the time was right,” court papers say. By then, police had been notified of the stolen U-Haul and were waiting by the vehicle when Henry appeared the next morning, March 28. Prosecutors said Henry made incriminating statements during questioning which were corroborated by “independent evidence including video surveillance and items found on his cell phone.”

Seeking revenge for the New Zealand mosque shootings

On April 3, Fabjan Alameti, 21, was arrested at a shooting range in Bozeman, Montana after he paid $35 to rent an M1A rifle, a civilian version of the M14 rifle used by the US Army. Alameti, an Albanian national with US citizenship, had moved to Montana from the Bronx, New York a month earlier. He allegedly told an informant he wanted to “avenge” the shootings at two New Zealand mosques that left 50 people dead. He wanted to shoot up a US military facility, a government building, gay club, or synagogue, according to authorities.

Alameti was already on the FBI’s radar. After a confidential informant told the bureau earlier this year that Alameti had been posting pro-ISIS comments on Facebook, agents began surveillance, according to court documents. Alameti later told the FBI he wouldn’t carry out an attack in the US because the country had given him citizenship.

“We want to make it absolutely clear that Mr. Alameti has no known ties to Montana or any affiliation with the Muslim community in Bozeman,” FBI agent Paul Haertel said in a statement. An affidavit filed in federal court by an FBI agent working the case says Alameti told the informant he moved to Montana because it is easier to buy a gun there.

On the precipice

Under Trump, the US has essentially dismantled its “Countering Violent Extremism” interagency task force, reducing its staff by more than 50% and slashing its budget from $21 million to $3 million. Under Nielsen, the DHS was also in the process of restructuring how it deals with terrorism. The department commissioned the Rand Corporation to conduct a wide-ranging survey of its approach. Neumann, who reports to another acting official, Chad Wolf, announced the results in a 300-page report as part of a presentation at the conservative Heritage Foundation inFebruary.

“We need to be much more coordinated, as a government, much more systematic in how we’re using our dollars and our people in how we go after this problem,” Neumann told audience, adding the administration was “on the precipice” of creating an entirely new way of dealing with the issue. Since February, the opposite had happened.