More than 18 months after the Agriculture Department relocated two research agencies from Washington to Kansas City, Mo., prompting a major exodus from both divisions, the agencies are still struggling to regain their strength.

Even after a round of hiring in the past year, the permanent staff of the Economic Research Service is down 33 percent from where it was near the end of the Obama administration, and the National Institute of Food and Agriculture workforce has declined 34 percent. According to USDA, they have 115 and 130 job vacancies, respectively.

“We lost some of the nation’s best economists and agricultural scientists in the previous administration,” USDA spokesman Matt Herrick said in an email. “It will take time for the new administration to rebuild USDA’s scientific and research agencies and restore their confidence and morale.”

President Trump left a legacy of disillusionment and despondency across federal agencies. The Post's Lisa Rein and Tom Hamburger analyze Trump's lasting impact (Zach Purser Brown/The Washington Post)

The problems at the Agriculture Department are reflected across the government. A few weeks after taking office, Biden and his team are confronted with numerous challenges, including smoothing over chaotic operations, boosting flagging morale and staffing up agencies that dwindled. To achieve their policy goals, they must move quickly to communicate a sense of mission, build expertise, improve performance, assure stability and regain public confidence, analysts say.

“They’re going to have the traditional challenge of transition, but now they’ll have to address the institutional damage,” Max Stier, president and chief executive of the nonpartisan Partnership for Public Service, said of the Biden team.

“You had a president who went to war with his own workforce,” Stier added. “It’s not like you flip a switch and the loss of expertise and harm to morale reverse themselves.”

Looking across the agencies, Stier and other experts on the federal government see symptoms of the damaged bureaucracy: Key jobs are unfilled, talent has departed, departments were politicized, and morale was harmed. Civil servants have hunkered in a defensive crouch as Trump and his allies demanded political loyalty, tested their professionalism and called them the intransigent “deep state.”

“The more time I spend in DC at the start of this Administration, the more I see what the career civil servants were forced to endure these last 4 years,” Andy Slavitt, a senior adviser for Biden’s coronavirus response, wrote on Twitter recently, praising the “quiet heroism” of the federal workforce.

Russell T. Vought, who served as Trump’s top budget official and now leads a new pro-Trump think tank called the Center for American Restoration, disputed characterizations that the government was “broken” by the last administration. “I’m of the opinion that all the changes that we made, particularly to the Office of Management and Budget, led them to being stronger,” Vought said.

OMB created efficiencies that helped the agency move faster on rules and regulations, and in dispensing funds, he said, even if some of those efficiencies were unpopular with civil servants.

Biden is working to buck up the career officials who are now part of his administration — but that he says work for the country, not him.

“I believe in you. We need you badly,” Biden told diplomats at the State Department on Thursday. “And I’m going to have your back — that, I promise you — just like you’re going to have the backs of the American people.”

Good-government groups have advised the new administration to consider launching a broad effort to rehire civil servants who left or were forced out during the past four years, particularly those with hard-to-replace expertise in their fields.

A senior Biden aide, who spoke on the condition of anonymity to discuss information obtained during the federal transition, said the rebuilding of the federal government will be more extensive than anticipated. “We knew the house we had to rebuild was on a little bit of shaky ground,” the aide said. “We realized that it is just a house that is in disrepair.”

Restocking the government

One focus for the Biden administration: restocking corners of the government, from the Environmental Protection Agency to the State Department’s diplomatic corps, that were hollowed out as career staff quit or retired during the Trump era and were not replaced.

Some of the highest-profile departures were motivated by objections to Trump testing the legal boundaries of his power, like a series of exits at the Justice Department.

Jonathan Kravis, who had worked as a federal prosecutor for 10 years, quit after Attorney General William P. Barr intervened to reduce the sentencing recommendation he and other career attorneys had made for Trump ally Roger Stone. Two civil rights prosecutors assigned to the investigation of the police shooting of 12-year-old Tamir Rice left as top officials stymied their efforts to push that case forward.

Trump officials’ push to shift hundreds of jobs away from the District also has thinned the government’s ranks.

In July 2019, Interior Secretary David Bernhardt announced he would move the Bureau of Land Management’s headquarters from the District to Grand Junction, Colo., and relocate hundreds of employees. Of the 328 employees affected by the plan, 287 of them — 87 percent — decided not to move and either retired or found new jobs by the end of last year.

Federal agencies also bled staff as Trump refused to appoint replacements, including in crucial positions for national security. By the end of the Trump administration, nearly half of the top 60 jobs at the Defense Department weren’t occupied by Senate-confirmed individuals, according to a Nov. 20 analysis by Defense News, leading to a hollowed-out Pentagon replete with acting officials, including in the top job.

The Occupational Safety and Health Administration’s inspection force is at its lowest point since the 1970s, workplace safety experts said, with 761 inspectors in place to cover the country, down from 815 in 2016. The agency had no Senate-confirmed director during Trump’s presidency, and he left office with 40 percent of the agency’s senior positions vacant.

Another crucial task awaiting Biden: shifting the spotlight away from agencies that Trump tarred as the so-called deep state and that the government needs to be staunchly apolitical.

From before he took office to the day he left, Trump portrayed the intelligence community, and the CIA in particular, as a nest of conspirators bent on his political defeat. Trump moved in his final days to declassify information about the Russia investigation and install loyalists at the senior levels of the intelligence community.

In October, John Ratcliffe, a former congressman whom Trump installed as the director of national intelligence, approved the release of previously classified documents. None of them showed that the intelligence agencies conspired against Trump. But intelligence officials warned the White House and Ratcliffe that their release could reveal intelligence sources inside Russia and make it harder to recruit foreign spies.

Meanwhile, the refugee office at the Department of Health and Human Services — staffed with social workers who’d spent their careers aiding migrants — was repeatedly pressed into service as part of Trump’s immigration crackdown.

The office, which took custody of thousands of migrant children that the Trump administration separated at the border in 2018, repeatedly shared confidential information with officials at Immigration and Customs Enforcement, including children’s therapy notes.

“For the last four years, the Office of Refugee Resettlement has been forced to operate as a junior partner in immigration enforcement,” said Mark Greenberg, a senior fellow at the Migration Policy Institute, who advised on Biden’s transition. “That was fundamentally counter to its mission as an agency, and the challenge for new people coming in is to restore its mission in service to children.”

Far from the Oval Office, lower-level Trump officials repeatedly reassigned career officials who questioned their push to reverse existing health, energy and environmental protections.

Lorie Schmidt — a longtime EPA lawyer who oversaw at least 40 attorneys working on air policy — offered legal advice during Trump’s first year that sometimes clashed with his goals, according to current and former EPA officials who spoke on the condition of anonymity to discuss a personnel matter. She was reassigned to work on “special projects,” though she had not been assigned any specific tasks.

About a month later, these individuals said, Schmidt agreed to work for the Virgin Islands’ environmental agency in the aftermath of Hurricanes Irma and Maria.

Schmidt eventually was reassigned again, to serve as the top career lawyer in EPA’s Solid Waste and Emergency Response Law Office — which was outside her traditional issue area.

Asked to comment on the matter, Schmidt declined.

Many are worn out

Even as they shipped out career experts, Trump officials padded key offices with political appointees. Matthew Davis, who worked as a health scientist at the EPA’s Office of Children’s Health Protection for six years before switching to the Office of Congressional and Intergovernmental Relations, said in an interview that the number of appointees in congressional affairs more than doubled during the Trump era.

“They basically didn’t want anyone in the career staff getting their hands on information,” said Davis, who now works as legislative director for the League of Conservation Voters advocacy group. “They built up this large number of political appointees in congressional affairs particularly, so the career officials didn’t handle oversight requests.”

According to the EPA, the number of political hires in the division rose from an average of five during the Obama years to 12 by the end of Trump’s term.

At the Food and Drug Administration, which was bullied and publicly criticized by Trump and other senior administration officials, top priorities are restoring a sense of calm and rebuilding morale. The agency endured unprecedented political pressure to rush through coronavirus-related products, many of dubious quality.

“The constant pushback needed and the number of times the agency was overruled were both exhausting and demoralizing,” said one senior FDA official, who spoke on the condition of anonymity because the official was not authorized to speak publicly about the issue.

Most key FDA staff members stayed in their jobs, determined not to abandon work on the pandemic, but many are worn out, the official added. The new administration, agency employees said, can bolster the agency simply by refraining from prodding the agency to take actions that were not supported by science or in the public interest.

Across the government, some offices have been downright dysfunctional for four years, as was the case at the small Merit Systems Protection Board, a court of last resort for federal employees who contest personnel actions taken against them, including retaliation for whistleblowing. The office had no board during Trump’s entire term, leaving a backlog of more than 3,000 unresolved cases.

The State Department is in particularly “deep disrepair,” said Brett Bruen, a former Foreign Service officer with a number of contacts within the building. “There has got to be a massive investment in the personnel and infrastructure of diplomacy,” he said.

Before Trump’s attempt to overturn the 2020 election, one of the most dispiriting developments for career officials was the president’s firing of the U.S. ambassador to Ukraine, Marie Yovanovitch, following a smear campaign led by his lawyer Rudolph W. Giuliani.

Advocates for the State Department say the Biden team can do much to renew the trust between career diplomats and the political leadership by appointing Foreign Service officers to senior positions in the department. Trump had stocked the ambassador corps with an irregular number of political appointees, hitting 57 percent in 2019, well above the 30 percent common in most administrations.

“We hope that the new administration will return to historical norms in terms of the percentage of political appointees named to senior positions, and will ensure that all nominees are fully qualified,” said Ambassador Eric Rubin, a career diplomat and president of the American Foreign Service Association, the union that represents U.S. diplomats. “That unfortunately has not been the case in recent years.”

Shane Harris, John Hudson, Laurie McGinley, Paul Sonne, Lena H. Sun, Andrew Ba Tran and Matt Zapotosky contributed to this report.