President Trump has cast the shuttering of federal agencies as a standoff over his plan to build a wall on the southern border. But for many White House aides and allies, the partial shutdown is advancing another long-standing priority: constraining the government.

Prominent advisers to the president have forged their political careers in relentless pursuit of a lean federal budget and a reined-in bureaucracy. As a result, they have shown a high tolerance for keeping large swaths of the government dark, services offline and 800,000 federal workers without pay, with the shutdown having entered an unprecedented fourth week.

Those encouraging a hard line include acting White House chief of staff Mick Mulvaney and acting White House budget director Russell T. Vought, as well as leaders of the House Freedom Caucus, whose members have taken on an influential role with the White House.

Mulvaney and Vought have taken steps to blunt some of the shutdown’s most unpopular effects, calling back furloughed employees to process tax refunds, collect trash in national parks and ensure food stamps will continue to be issued.

But Mulvaney is not rattled by the fallout and instead has been focused on protecting Trump from criticism, according to two administration officials who were not authorized to speak publicly.

Mulvaney did momentarily urge compromise on funding for a wall in a meeting on Jan. 4, the officials said. But Trump quickly shot down his suggestion, and Mulvaney has since been in step with Trump.

Reps. Mark Meadows (R-N.C.) and Jim Jordan (R-Ohio) — leaders of the Freedom Caucus and the president’s top allies in the House — have urged Trump to stay the course. They have built national profiles with calls to slash federal spending — not as much on strengthening border security.

The shutdown is “a means to an end for something they have long pursued, which is limiting the size and scope and role of government,” former House GOP staffer Kurt Bardella said of the conservative Freedom Caucus. Bardella became a Democrat in 2017.

“These are small-government guys, not wall guys,” one former White House official, who spoke on the condition of anonymity to discuss private exchanges, said of Meadows and Jordan.

Conservatives have for decades questioned the size and effectiveness of the federal bureaucracy. The shutdown has in some ways underscored their view that government can function with fewer employees.

“There’s a moment when people say, ‘Did you notice what percentage of this agency was viewed as nonessential?’ ” said anti-tax activist Grover Norquist.

Former White House chief strategist Stephen K. Bannon called shutdowns “blunt-force measures that certainly show what’s essential and what’s not.”

Bipartisan Senate group forming in search of shutdown deal

Some argue that furloughed employees are not suffering significant harm.

About 420,000 employees are still working without pay during the shutdown because their jobs are considered essential to public safety or national security. An additional 350,000 are on furlough. Both groups are expected to get back pay when the government reopens.

“It’s inconvenient that they’re not getting paid,” Barry Bennett, a former Trump campaign adviser, said of the furloughed workers. “But it’s for time they’re not even going into the office.”

He said, though, that while conservatives want to rein in the size of government, a shutdown is not an optimal path: “We prefer to use a scalpel rather than a sledgehammer.”

Trump has been unfazed about leaving so much of the government dormant. On Monday his standoff with congressional Democrats, already the longest shutdown on record, dragged into its 24th day.

He has received scattered briefings on how the shuttered agencies are coping, according to two senior administration officials. He has shown fleeting interest in the minutiae as Vought has outlined which services are being affected.

On Sunday, Trump reinforced his downplaying of the shutdown’s effects, tweeting, “The damage done to our Country from a badly broken Border - Drugs, Crime and so much that is bad - is far greater than a Shutdown.”

The closure of 10 Cabinet agencies and dozens of smaller ones has rattled many Americans and curtailed services such as food safety inspections and approvals of low-income loans.

The political costs for the Trump administration could mount starting this week, as federal courts run out of money to operate on Friday and the Coast Guard misses its first paychecks. Airports have begun closing terminals as baggage screeners call in sick instead of reporting to their jobs.

There is a growing sense within the White House that a protracted shutdown will produce a cascade of unanticipated effects that could eventually damage the president politically.

But for now, Trump’s conservative allies have few qualms about Washington’s empty streets and dark offices. The small-government contingent “is not a voice of constraint here,” said a former senior administration official who spoke on the condition of anonymity to describe private conversations. “There is a realization among some that the shutdown is not the end of the world.”

Trump’s inner circle is stocked with officials and senior advisers who have long shrugged off shutdowns as painful but needed lapses.

Federal law enforcement: Are you working during the partial government shutdown?

Mulvaney joked during last year’s brief shutdown that he has been accused by critics of being an “arsonist” of government.

“Cut it or shut it,” Vice President Pence, then an Indiana congressman, said at a tea party rally in 2011.

Larry Kudlow, a conservative commentator who now serves as the top White House economic adviser, the same year called a government shutdown in Washington “a minuscule price to be paid for the greater good of financial solvency and economic growth.”

From its start, the Trump coalition has mixed small-government ideology with a penchant for disruption.

“The Democrats have always had much more anxiety about” a prolonged shutdown, said Republican former House speaker Newt Gingrich, an informal Trump adviser.

The shutdown follows two years of contraction of the federal workforce under Trump. During his first 18 months in office, the government shrank by 17,000 employees, according to an analysis of federal personnel data by The Washington Post — the first downward shift in two decades.

As one of his first acts, Trump froze hiring across the government, except at the Department of Veterans Affairs and a few other agencies. The freeze morphed into a slowdown that has left hundreds of jobs unfilled as employees retire and quit.

Trump has signed executive orders — later largely struck down by a federal judge — to weaken the powerful unions that represent federal employees and make it easier to fire them. Just before Christmas, he announced that civil servants would not receive a cost-of-living raise for 2019.

The quick fixes in the past week to patch programs with money from fees rather than salary budgets have provoked cries from Democrats that the White House is carving out exceptions for political reasons to minimize the pain of the closures.

“The takeaway is, the commander in chief doesn’t care about the civil service,” said Sen. Chris Van Hollen (D-Md.). “It’s like they have a full-scale assault on the mission of the agencies.”

Some federal workers have reached the end of their patience with an administration that they say does not value the sacrifices they make to work in the public sector or support the mission of the federal workforce.

“Why do I need to put up with this nonsense when I’ve already done my duty?” asked Anel Flores, a furloughed mission systems engineer at NASA’s Goddard Space Flight Center in Greenbelt, Md.

With 36 years of service and multiple shutdowns behind him, Flores is irked by Trump’s depiction of federal workers as Democrats who deserve a shutdown. He said he is ready to file paperwork to retire when NASA reopens.

The prolonged shutdown is eroding morale in corners of the workforce where Trump has long enjoyed deep support, including airport baggage screeners, who have been calling in sick in a job action to protest working without pay, and Border Patrol agents, whose jobs are stressful to begin with.

“I need to work just a few more years to not need to downsize — and we love our home — and I am not willing to work a few more years,” said a Customs and Border Protection employee in her 50s who works near the California border. She spoke on the condition of anonymity for fear of jeopardizing her retirement.

A lifelong Republican who recently turned independent, she blames an indifferent president she says has forced her to work without pay. And she plans to sell her house so she can quit sooner.

“I even applied for a promotion two months ago,” she said, “but now I would turn it down and leave.”

The agencies that have seen the largest drops since Trump took office are the Departments of Housing and Urban Development, Education, Commerce and Energy. Many civil servants who have left say they objected to a new culture that seemed to undermine the mission of their agency and undermine their contribution.

Critics worry that the exodus is depleting government of valuable expertise. Almost 20 percent of the workforce overall was eligible to retire in October, including more than a quarter of HUD, the Treasury Department, the Environmental Protection Agency and NASA, according to data compiled by the nonpartisan Partnership for Public Service.

Just 6 percent of civil servants are 30 or younger, a trend that started in the Obama administration and has accelerated under Trump.

“It’s very hard to look a young professional in the eyes and tell them not only that their talents aren’t sorely needed but that they won’t find a rewarding career where their work and dedication will be valued,” said Phillip Cooper, a professor of public administration at Portland State University who is telling his students to steer clear of federal work.

Andrew Ba Tran and Josh Dawsey contributed to this report.