The Department of Homeland Security has withdrawn its officers from the front lines of the protests in Portland, Ore., but the backlash that President Trump’s intervention in the city triggered — and the lead role DHS has played in his presidency — could prove far more lasting.

Created after the Sept. 11, 2001, terrorist attacks as a bulwark against further atrocities inside the American homeland, DHS had become a symbol of the government’s response to the national trauma, carefully projecting a staid, strait-laced image. It grew exponentially larger and more powerful on the strength of broad bipartisan support.

Nearly two decades later, Trump has changed that.

The president took office with immigration enforcement plans that placed DHS at the forefront of his domestic agenda. In the 3½ years since, the White House has run the department as an instrument of policy and politics, appointing openly partisan figures to its top leadership ranks, where they serve in acting roles without the slightest pretense of a formal nomination.

Trump has demonstrated little interest in DHS beyond its monthly report of immigration arrests and the pace of construction on his border wall project, Homeland Security officials say. He has attempted to use the agency to advance the long-standing goals of immigration hard-liners, from a “Muslim ban” to family separations to threats of busing migrants to sanctuary cities governed by Democrats. And when the coronavirus pandemic attacked the country — triggering the biggest national crisis since the 9/11 attacks — DHS remained in a secondary role.

It was the president’s use of force in Portland last month that appeared to cross a line for DHS founders, who cringed at the department turning its powers inward against Americans.

“I wasn’t just disappointed — I was angry,” Tom Ridge, the former Pennsylvania governor who served as the department’s first secretary under President George W. Bush, said in an interview. “The president has perverted the mission of DHS.”

“Creating the perception that the department is a political arm of the president is an abuse I never thought I’d see,” Ridge said.

If elected to the presidency in November, presumptive Democratic nominee Joe Biden is likely to face calls to reorganize or even dismantle DHS, the third-largest federal agency after the departments of Defense and Veterans Affairs, with a $62 billion budget and 240,000 employees.

Proposals to carve up DHS remain outside the mainstream, but they have intensified within a segment of the Democratic Party. The American Civil Liberties Union this week urged DHS’s breakup, and counterrorism expert Richard Clarke has called for its demise, arguing that Trump has made the department “synonymous with unsympathetic government overreach, malevolence and dysfunction.”

Some developing proposals to dismantle DHS would essentially restore its agencies and subagencies to their pre-9/11 homes. Immigration and border enforcement would go back to the Justice Department. The Treasury Department would reabsorb the U.S. Secret Service, and the Transportation Department would take over the Transportation Security Administration. The Coast Guard would go to the Pentagon.

The proposals are anathema to longtime DHS officials who say such a breakup would leave the country vulnerable once again to a mass terrorist attack and a repeat of the missteps that led to 9/11, when federal agencies failed to share information and provide the kind of coordinated response that could have prevented the catastrophe. The department has centralized the country’s screening and security efforts into a single, coordinated entity.

“We are a what-have-you-done-lately-for-me country,” said Stewart Baker, who was the top policy official at DHS after the department’s creation. “If you successfully prevent another 9/11 for 20 years, people start to think 9/11 can’t happen again, which is wrong.”

Trump used his early pick of Gen. John F. Kelly to be DHS secretary as a way to initially assuage anxieties about his intentions to disrupt the federal establishment. The appointment of a Marine Corps general also signaled a priority on national security. Instead, it was the start of the department’s most turbulent period since its creation.

Trump has had four more Homeland Security chiefs since then, some who have clashed with the White House and Trump immigration adviser Stephen Miller, who wields influence over department appointments and policy initiatives. The White House has displayed an unprecedented disregard for the norms of the confirmation process, leaving senior positions vacant for years despite Republican control of the Senate.

In the absence of department leaders who could earn Senate confirmation, Trump has filled key positions with partisan figures who earned their jobs by praising the president on television, including acting Customs and Border Protection commissioner Mark Morgan, and Ken Cuccinelli, whose title is senior official performing the duties of the deputy secretary.

Morgan urged the president’s reelection last week on Fox News, a potential violation of the Hatch Act, which prohibits executive branch authorities from using their positions to engage in partisan advocacy. Cuccinelli uses his government Twitter account to mock critics and post pictures of his meals.

Some of the department’s founders have worried that DHS lacks the institutional resiliency to push back at the White House in the way the Pentagon did as the president called for troops to intervene against protesters in Washington’s Lafayette Square and elsewhere.

Chad Wolf, the current DHS acting secretary, vigorously defended the use of federal agents in Portland, while insisting that the department would protect the First Amendment rights of demonstrators who remain peaceful. During testimony on Capitol Hill last week, Wolf called criticism from Ridge and former DHS secretary Michael Chertoff “dead wrong” and drew praise from Republicans for his handling of the protests.

Continued violence and rioting by militant protesters in Portland appeared to have muted some Democrats’ criticism while bolstering Wolf’s argument that the federal forces saved the courthouse from destruction.

DHS spokesman Alexei Woltornist said the administration’s response in Portland was fully consistent with the Bush-era legislation that established the department.

“The varying missions of DHS components allows us to counter evolving threats,” Woltornist said. “Any suggestion that DHS was founded solely for counterterrorism is a misreading of history.”

“DHS is acting within its authorities as passed by Congress,” he said.

How those authorities are wielded remains a source of contention, particularly among DHS officials concerned about long-term damage to the department’s reputation.

The Atlantic Council’s Scowcroft Center for Strategy and Security published a report Thursday on the future of DHS, urging the department to focus its efforts on protecting the country from external threats and major security risks: the coronavirus pandemic, climate change and attempts by hostile state actors including Russia, China and Iran to undermine American democracy.

“The covid-19 pandemic, the long-term threat to U.S. infrastructure from climate and weather changes, and the increasing non-kinetic actions by nation-state adversaries in 2020 that seek to undermine U.S. power, all point to the need for the United States to make another fundamental change in how the U.S. government defends the nation and keeps the American people safe,” the report states.

With input from more than 100 former DHS leaders and security experts, the report — the first published by the Scowcroft Center since the death of retired Air Force Lt. Gen. Brent Scowcroft last week — points out that the coronavirus pandemic has been killing approximately as many Americans as died on 9/11 every four days.

“For all the times DHS gets criticized, we’re now in a situation where we really need DHS to do things that no one other than DHS can do as well,” said Tom Warrick, a former DHS official who is one of the report’s authors.

The department should be playing a much more robust role in coordinating the federal government’s response to the pandemic, he argues, and should embark on a broader effort to return its focus to big-picture national security threats.

The department’s shift toward immigration enforcement was changing perceptions of DHS even before Portland, and that needs to recalibrate, said co-author Caitlin Durkovich, a former DHS official who worked on infrastructure defense.

“If there are actions that seem to be coming from a place of partisanship, it’s going to impact and diminish the trust that has long governed and underpinned how the department is supposed to work,” Durkovich said.

Baker, the former DHS policy chief under Bush, said he expects calls to dismantle DHS to die down if Biden wins in November and the department is no longer so closely aligned with the president’s agenda.

“My guess is the answer will be — and should be — that there’s nothing wrong with DHS from a Democratic Party perspective that can’t be solved by having a Democrat as secretary who believes in what the party believes in,” Baker said.