WASHINGTON — As President Donald Trump imposes sweeping entry restrictions in a bid to stop the spread of the coronavirus — and considers still more — he's relying on an agency to help implement them that has been hollowed out at the top ranks in a revolving door of leadership, potentially hampering his administration's response to the crisis.

It has been nearly a year since the Department of Homeland Security has had a Senate-confirmed leader. Acting Homeland Security Secretary Chad Wolf, the fourth person to lead the agency in three years, has been on the job less than six months.

In addition, 65 percent of top jobs in the department are vacant or filled by acting appointees, more than in any other federal agency, according to the Partnership for Public Service, a nonprofit group that advocates for more effective government. Among the vacancies are the No. 2 official at the Federal Emergency Management Agency, the department's top lawyer and the head of the country's immigration system.

That has led to a cascade of other unfilled jobs, a vacuum of leadership causing major decisions to be deferred and a drop in morale at the agency that was born out of the terrorist attacks of Sept. 11, 2001, to coordinate the government's response to threats, said people close to DHS. After a chaotic rollout over the weekend of restrictions on many travelers from Europe — where those returning to the U.S. were held for hours in cramped conditions — there are new concerns that the agency isn't prepared to manage what's to come.

"You have the vacancies, the musical chairs with positions throughout the organization and policies that come down without a lot of forethought putting added stress on a workforce that already has an extremely crucial job to protect the homeland," said David Lapan, who was a spokesman for DHS during Trump's first year in office. "So at what point do we break them?"

To Lapan, the chaotic scenes at airports over the weekend were a reminder of what happened when, in the early days of his presidency, Trump abruptly announced travel restrictions on passengers coming from predominately Muslim countries without giving DHS time to prepare.

"You are asking the folks on the front lines to implement a policy that they have not yet been fully informed on or trained on, so of course you are going to have confusion," Lapan said. "You have these issues because, again, it seems like it was implemented too quickly to allow the workforce to be able to properly implement it."

Full coverage of the coronavirus outbreak

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

DHS' leadership has been in flux since a purge last April, encouraged by Trump policy adviser Stephen Miller, that included Secretary Kirstjen Nielsen, who was forced out in part because she pushed back against Trump's policy to separate children from their families at the Mexico border.

She was replaced by Kevin McAleenan, the commissioner of Customs and Border Protection, who was put in as acting secretary but was never formally nominated for the position. McAleenan left in October and was replaced the following month by Wolf, who was Nielsen's chief of staff and had been confirmed by the Senate for a different job at DHS. Like McAleenan, Wolf hasn't been nominated to fill the job on a permanent basis.

Also in doubt is who at DHS is overseeing the nation's immigration system as restrictions are placed on who can come into the country amid the spread of the coronavirus. A federal district court ruled this month that Citizenship and Immigration Services Director Ken Cuccinelli, a member of Trump's coronavirus task force, was unlawfully appointed to the job under the federal vacancies act. Cuccinelli, who hasn't been confirmed by the Senate for any job, is now referred to on the DHS website as a senior official performing the duties of the director.

While many of the jobs are filled by temporary appointees to carry out the day-to-day tasks, some — such as the role of deputy director of FEMA — have no one in the job and are listed as vacant. In other cases, officials are performing two jobs at once, as in the DHS Office of Strategy, Policy and Plans, where the jobs of undersecretary and deputy under secretary are being filled by the same person.

"It is like the substitute teacher," said Max Stier, president of the Partnership for Public Service. "We have all had them, they might be wonderful educators, but they get no respect from the classroom, and they themselves don't see their job as taking on the long-term problems or the tough ones. That is why people should be concerned about not having long-term leadership."

A spokesperson for DHS called the suggestion that the vacancies have affected the department's response "absolutely absurd": "DHS's leaders have been at the forefront in helping contain the COVID-19 crisis. Thanks to President Trump's leadership, DHS has been able to respond wherever and whenever needed. We look forward to the Senate confirming our appointees."

There are no nominees from the White House for the jobs of homeland security secretary, deputy secretary, general counsel, under secretary for management, deputy administrator for FEMA, commissioner of Customs and Border Protection or director of Citizenship and Immigration Services, according to data compiled by the Partnership for Public Service.

That turnover at the top likely has had a trickle-down effect on staffing throughout the department, with top officials having their own entourages of aides who come and go with them, Stier said. In addition, when an official is in a temporary or acting role, it can make it more difficult to fill open positions, because those applying don't know whether the person hiring them will ultimately be their boss.

Download the NBC News app for full coverage and alerts about the coronavirus outbreak

Adding to the strain is the heavy focus over the last three years on immigration at the southern border, taking attention from other areas the agency is responsible for, like preventing terrorists from entering the country at other points of entry, cyberterrorism and disaster response, Lapan said.

Now, as the focus shifts to responding to the coronavirus, an agency already stretched thin is just three months away from the start of hurricane season in the Atlantic, he said.

While Homeland Security has more key vacancies than any other government agency, it's not the only department involved in the coronavirus response to have suffered staffing issues under the Trump administration. At Health and Human Services, 28 percent of key posts aren't filled, according to the Partnership for Public Service. At the Defense Department, 34 percent are vacant.

Trump downsized the White House national security staff to eliminate jobs addressing global pandemics and fired Tom Bossert, whose job as homeland security adviser on the National Security Council included coordinating the responses to those crises. Bossert wasn't replaced.

Last year, Rear Adm. Tim Ziemer, the NSC's senior director for global health security and biodefense, left the council and wasn't replaced. Neither was Dr. Luciana Borio, the NSC's director for medical and biodefense preparedness, who left in May 2018.

"You can't respond well to a pandemic without preparation," Stier said. "You really actually have to do a lot of work ahead of time."