President Trump’s disdain for expertise is well-documented. He called Anthony S. Fauci and other medical experts “idiots.” He has ignored government scientists who accept the reality of climate change. He sidelined diplomats who warned banning Muslims would hurt the United States’ reputation overseas.

Rather than value knowledge or professional competence, Trump prizes just one thing: political loyalty. His approach has already caused long-lasting damage in the government he heads, yet he wants to go further.

Now Trump has moved to drastically expand the number of federal civil servants whom he can fire at will and replace with political hacks and cronies.

It’s a stunning assault on the independence and professionalism of the civil service, with big impact in the national capital region. It reverses a bipartisan consensus dating back 137 years that nearly all federal workers should be above party politics.

Presumably, the change won’t last if Joe Biden wins the presidency. Biden could overturn Trump’s executive order of Oct. 21 with one of his own on his first day in office, if elected.

But if Trump wins another term, tens of thousands of mid- and upper-level employees will lose their civil service protections unless the courts intervene. Trump and his appointees could fill their posts with anyone they choose — campaign donors, friends, relatives, ideologues — regardless of whether they know anything about the work they’re entrusted to do.

“This is an attempt by President Trump to significantly politicize a large chunk of the federal bureaucracy, which is currently selected competitively on the basis of merit, and substitute one selected by whim and caprice,” said Robert M. Tobias, a professor in the Key Executive Leadership Programs at American University.

Trump’s executive order is vaguely worded, so nobody is sure exactly whom it would affect. But it seems most likely to strip protections from people just below the Senior Executive Service (SES) — at the GS15, GS14 and GS13 levels.

These include policy analysts, program managers, researchers and data collectors. They don’t set policy themselves but provide critical information, background and other expertise for the political appointees who do. (Trump probably would have gutted protections for the SES as well, except those are more clearly protected by statute.)

“These are jobs that cut across almost any function of government,” said Max Stier, president of the nonpartisan Partnership for Public Service. “This isn’t about policy disputes. This is about having the best information to make those policy decisions.”

Departments and agencies likely to be heavily affected include Energy, Interior, Labor, Health and Human Services, Housing and Urban Development, the Environmental Protection Agency and bodies that regulate banks and financial markets.

It’s easy to imagine that this would ease the way for the Trump administration to take steps such as to further weaken environmental regulations, labor protections, bank oversight and the Affordable Care Act.

“The [existing] protections are important because there should not be, in my mind, a Democratic or Republican way of forecasting hurricanes, or landing men or women on the moon, or ensuring that Social Security checks reach people’s bank accounts every month,” said Donald F. Kettl, a professor at the LBJ School of Public Affairs at the University of Texas at Austin.

“For almost 140 years, we’ve had a tradition of hiring people based on merit, promoting them on the basis of merit, and what this does at a stroke is put all of that tradition in jeopardy,” he said.

Without civil service protections, government experts would be wary of pointing out to their bosses that a certain proposal, though politically desirable, was illegal or not based on facts. They would hesitate to risk their jobs by respecting their oath to serve the Constitution rather than whatever president happens to be in power.

“In the past few years, we’ve already seen a chilling effect on the federal workforce when it comes to the science of climate change,” said Tony Reardon, national president of the National Treasury Employees Union (NTEU). “If the executive order stands, I do think that the chilling effect would really double, triple or even worse.”

Federal employees are a favorite target for criticism, especially by conservatives. They are stereotyped as overpaid and incompetent — but that doesn’t stop the public from running to them for help when, say, a pandemic or hurricane strikes.

It’s true that low-level federal workers tend to earn more than they would in the private sector. But the mid- and upper-level professionals targeted by Trump typically have expertise and experience that would earn them higher salaries in the private sector, according to academic experts. They stay in government often because of a commitment to their public mission.

It’s possible Trump’s action will not survive legal challenges. The NTEU has filed a lawsuit to block it, alleging that Trump exceeded his authority in taking away so many employees’ rights.

Democratic Reps. Gerald E. Connolly (Va.), House Majority Leader Steny H. Hoyer (Md.) and Carolyn B. Maloney (N.Y.) have filed legislation that would both reverse Trump’s order and make it harder for any president to take similar action in the future.

Connolly, who represents about 56,000 federal employees in his Northern Virginia district, said it was necessary to propose the legislation even though it would pass Congress only if the Democrats win control of the Senate.

“We had to put the marker down,” Connolly said. “People have to understand that simply reversing this is only part of the job. We cannot allow the executive to have sweeping power to essentially nullify the whole purpose of a civil service system.”

It’s conceivable that if Trump loses, he could attempt to use the order to cripple the Biden administration as a final vindictive action. In what experts called a “nightmare scenario,” the outgoing administration would dismiss legions of employees it didn’t like in its last days in office and possibly replace them with Trump supporters.

“Probably the most drastic impact of this would be a president who has power on Jan. 19 to fire however many of these people, effective immediately, leaving an incoming president with nobody to carry out tasks and maybe 100,000 vacancies to fill,” American University’s Tobias said.

Given Trump’s record, I wouldn’t put it past him to try.