It's no secret that American workers are getting older. Even as millennials become the biggest cohort in the labor force, the median age of all U.S. employees has crept up from 30 to 42 over the past 30 years. But when it comes to getting older, a POLITICO analysis finds, the private sector has nothing on the U.S. government.

The U.S. just elected the oldest new president in history, and Congress, too, has been getting consistently older, with its average age now up around 60.

But the vast majority of the government consists of the 2 million-strong federal civilian workforce. And thanks to slow-moving hiring practices and a huge cohort of baby boomers who haven’t retired at the predicted rates, it has grown significantly older than the American workforce overall. Today, just 17 percent of federal workers are under 35 years old. (In the private sector, almost 40 percent are.) And more than a quarter of federal employees are now older than 55.

In some agencies, the upward age shift is even starker. Sixty nine percent of NASA's workforce is over 45 years old. At the Department of Housing and Urban Development, it's 70 percent. At the tiny Government Publishing Office, it's even more extreme—80 percent.

In principle, there’s nothing wrong with older workers: They have more experience than younger ones and employers often report that they are more attentive at work. Age discrimination is not just illegal, but strips companies of experience and judgment; it's fair to say that plenty of Silicon Valley companies might benefit from the perspective of a more experienced cohort of employees. But workplaces that shift too far in any direction can suffer. There is evidence that offices with more older workers are less productive and, due to their workers' age, more expensive; health care costs are especially high, and a wave of retirements would leave the government on the hook for a major increase in pension spending. And broadly speaking, if the government is supposed to reflect America accurately—making small and large policy decisions that affect every aspect of the country—it’s only reasonable to expect that the federal workforce should reflect the generational makeup of the country.

Given the stereotypes about government employees, it's easy to assume that federal worker protections have led to a vast army of aging-in-place bureaucrats who simply can't be removed. But organizational experts and former federal human resource managers say the problem is more complicated than that, and more troubling for good governance. They see an ineffective hiring system that is decades out of date. They have spent years warning policymakers that rules and laws were inhibiting their ability to hire and train new employees. The aging of the federal workforce, they say, is a symptom of Washington’s inability to keep up with modern-day management practices and to plan for the future—as well as a system hamstrung by rigid federal employment directives, some of which, ironically, were aimed at freshening up the workforce.

“It’s not so much a matter that old people are stupid and young people are smart,” said Don Kettl, a professor at the University of Maryland who has written extensively on government management. “It’s that smart agencies develop a plan for a pipeline. The federal government’s biggest problem is it’s not very good at pipeline planning.”

IT WASN'T SUPPOSED to happen this way—or at least, for years, government analysts were worried they’d be facing the opposite problem. In 1988, the Hudson institute published an influential report called “Civil Service 2000” on the future of the federal workforce, warning that a glut of workers in their mid-careers would start leaving in 2002. That warning was supported by a raft of research suggesting a large block of middle-aged workers would all be entering their retirement years at the same time, wiping out huge amounts of institutional knowledge and swamping the government in a “retirement tsunami.”

But nearly 30 years later, that tsunami hasn’t arrived—and many experts think it never will. Instead, baby boomers have simply hung onto their jobs. “What we’ve really seen is the impact of better health and longer lives and people wanting to work together,” said Myra Howze Shiplett, who served in various personnel positions across the federal government and also authored a report in 1999 warning of a retirement crisis. Said another expert: “It’s been the coming crisis for 25 years.”

What happened instead is that the government workforce has simply shifted older and older. Over the past 20 years, the percentage of full-time federal workers younger than 45 has gone down, while the percentage over 55 has grown dramatically, up 83 percent, according to a POLITICO analysis of data from the Office of Personnel Management. Workers at the very youngest end, under the age of 24, represent just 1.2 percent of federal employees, compared with 13 percent in the private sector. In part, that’s because federal workers are much more likely than private sector workers to have a graduate level degree (29 percent vs. 11 percent), but it still is a remarkably small fraction of the overall federal workforce.

Most government agencies don’t have a mandatory retirement age, so with an economy that provides less and less job security for workers, it’s not exactly a surprise that many government employees have decided to continue working late into their careers.

Specialists on human resources interviewed for this story say this does have consequences. When I asked them about the effects of an aging workforce, many mentioned technology: A federal government operating in a time of smartphones and social media is staffed largely by people who grew up before the Web was invented, and many before computers arrived in homes. “A lot of the cyber crooks out there are themselves younger, and having people who are part of the video game culture improves your ability to be able to figure out how the other side is going to come at you,” said Kettl, adding, “Of course it’s ageist, but it’s also a fact.”

This belief isn’t universal, and there isn’t actually much evidence either way on whether younger people are more technologically savvy than older people. But younger people use technology more, and have grown up with high expectations in areas where government often falls short, such as customer service, user experience and response time.

There isn’t much academic research on how an aging workforce affects an organization more broadly, either. Surveys of employers have found that older workers are more experienced and focused on their work. But a study from last year found that an older labor force is less productive—and even makes young workers less productive as well, though it’s unclear why. There’s also evidence that older people are less able to learn new skills. And from a budgetary perspective, studies have found that older workers are more expensive, due to their greater use of health care services. These costs fall directly on the federal government, which self-insures its workforce.

Organizational experts say that the experience and talents of older workers make them a critical piece of any organization, but having a workforce with balanced ages is important for other reasons, including ensuring that the government—the entity that creates, implements and enforces policies—has a steady influx of new perspectives and fairly represents the interests of all Americans. Private sector companies put huge resources into recruiting and training younger workers under the belief that those workers will have a different viewpoint and new ideas. Said Sean Morris, who leads Deloitte’s federal human capital office: “The iconic companies, the ones most able to innovate and change to the ever increasing number of missions, are those that have a much more balanced number of generations."

THE FEDERAL GOVERNMENT is well aware that its workforce is getting older, and it’s trying to address the issue. Human capital officers—the people who manage agency personnel—have carefully tracked the numbers, attempting to recruit younger workers and replenish their ranks. But according to many former chief human capital officers, these efforts have been stymied, running into a thicket of bureaucratic rules and well-intentioned but poorly designed policies.

To experts, the problem is simple: The government simply isn’t designed to recruit and hire a modern workforce. The classification system for federal workers, for instance, dates back to 1949, and despite real progress in updating it, the rules still create huge challenges for agencies by forcing them to fit workers into certain prescribed categories rather than giving them the flexibility to hire and pay workers as they see fit. There’s no exact government-wide hiring policy. It is filled with exemptions and carve-outs, and thick with paperwork; the closest thing to an official manual is a 351-page handbook published by the Office of Personnel Management.

One rule that has especially bedeviled hiring managers is the veterans preference. The rule, which dates back to a law passed in 1944, was intended to force agencies, if faced with two similarly qualified candidates, to hire a military veteran over a non-vet. But numerous human resource experts said that in practice it creates almost a lock for veterans in many jobs: Because the hiring process effectively re-defines "similarly qualified" to encompass candidates with very different skill levels, veterans often get chosen by rule over considerably more qualified competitors.

“The veterans preference, it started in a good way. Right thing to do,” said Rebecca Contreras, former chief human capital officer at the Treasury Department, who is now president of AvantGarde, a consulting firm on human capital management. “But it’s taken over and inhibited a lot of agencies, and has locked down the opportunity to take anyone who is not a veteran.”

LEFT: During a press conference on hiring reform in 2010, Department of Housing and Urban Development Secretary Shaun Donovan shows the 40 steps involved for hiring a new worker using an old flow chart. RIGHT: President Barack Obama tries an "Earthquake Tower Challenge" as he visits a Brooklyn classroom in 2013 to highlight the importance of education for American workers. | Getty and AP Photo

Congress also makes the job harder: Federal hiring is highly dependent on the federal budget, and Washington’s dragged-out budget battles can be huge obstacles to hiring. Lawmakers rarely complete the budget process on time, often passing a stopgap measure when they can’t agree on spending levels. These so-called “continuing resolutions” appear innocuous—after all, the government stays open—but within agencies, they cause confusion and impose a de facto hiring freeze on most offices. Hiring officers have no idea how many workers they can hire. Often, they have to delay even planning their staffing levels, never mind actually recruiting and hiring candidates, until Congress reaches a more permanent deal.

According to former human resource officers, former President Barack Obama inadvertently made the problem worse with his own initiative to recruit younger workers—a new program that created more problems than it solved. This was part of Obama’s attempt to make government “cool” again and bring in a younger, more diverse workforce. Jeri Buchholz, formerly NASA’s chief human capital officer, remembered getting strict orders from Obama’s OPM on whom to recruit: “Early career people, veterans and Hispanics.”

In 2010, Obama issued an executive order creating something called the Pathways Program, which both streamlined existing internships and fellowships, and made it harder for agencies to use such programs to circumvent the veterans preference. Obama officials didn’t see these goals as contradictory, believing that agencies shouldn’t have trouble complying with the preference. “It should be seen as an opportunity,” said Shelley Metzenbaum, who had a top position overseeing personnel in Obama’s budget office.

On the latter goal, Pathways succeeded—OPM found that the percentage of veteran hires rose from 24 percent in fiscal 2009 to 33 percent in fiscal 2014. Overall, nearly a quarter of federal workers are veterans, compared to just 5 percent of the private sector workforce. But former human capital officers said it created huge hiring challenges, and the data show that many agencies nearly stopped hiring through Pathways altogether. In another critical way, Pathways hasn’t worked: Though the reforms were supposed to help bring younger people into government, the average age of people in the Pathways program was 27.1, up from 25.4 under previous programs.

These trends are worrisome for the age of the federal workforce—and that is evident in the data. The percentage of new hires younger than 30 fell from 37 percent in fiscal 2011 to 35 percent in fiscal 2016, according to OPM data. It’s unfair to blame that entirely on Obama or Pathways. After all, the government went through sequestration, and agencies faced intermittent hiring freezes during those years. That made workforce planning exceptionally hard and especially limited the government’s ability to recruit younger workers. But despite Obama’s efforts to recruit younger workers, nothing much has changed, and in fact new government workers now skew slightly older.

“They need to do targeted outreach, targeted sourcing, targeted marketing,” said Contreras. “It all goes back to having the right people on the right seat on the right bus. How is the government going to do that if they don’t make a comprehensive effort across the board?”

NONE OF THIS means that there haven’t been some smaller successes. Obama, for instance, implemented new programs to bring young tech workers into the government, including 18F, an agency created in 2013 to help government agencies improve their digital products, and the U.S. Digital Service, both of which brought workers from companies like Google and Amazon into the government for short stints. The goal was to infuse private-sector tech expertise into the workforce without tying down workers for years. It’s widely seen as a big success, reducing the time between interview and offer letter to 30 days, compared with around six months for most agencies.

If there is one agency that has succeeded in trying new hiring practices and recruiting a younger workforce in recent years, it is the Consumer Financial Protection Bureau, created in 2011 under the Dodd-Frank financial reform law. Fifty seven percent of CFPB workers are younger than 45—a number roughly in line with private-sector norms and higher than any other federal agency.

But the CFPB’s success is also an indictment of the current hiring system: The CFPB has the distinct advantage of being a new agency, without a legacy workforce. In addition, the agency was accused of ageism in the hiring process. Three people sued the CFPB after its applications were rejected saying they were denied employment “because of their age.” The agency denied the accusation and the case was settled out of court.

Can President Donald Trump turn around the federal behemoth? He’s promised to run the government like a private-sector company and tasked his son-in-law, senior adviser Jared Kushner, with modernizing government through the newly created Office of American Innovation. But there are a lot of reasons for skepticism that an influx of younger workers will enter the government anytime soon. One of Trump's first moves was a hiring freeze, and though it has since been lifted, it sent an immediate bad signal to potential candidates considering government careers, experts said. More importantly, Trump is very unpopular with young people: One recent poll found that 62 percent of millennials disapprove of his job performance, compared to just 22 percent who approved. (He’s more popular among older Americans—but not with federal employees, who overwhelmingly disapprove of his performance.) And if the economy continues to improve, workers will have other job options instead of working for Uncle Sam.

In addition, Trump doesn’t have the personnel in place to undertake a major overhaul of federal hiring practices. His nominee to head OPM, the most important personnel office, hasn't yet been confirmed—his initial nominee withdrew in August, and he named a new candidate in September. That means he'll go nearly a year in office without his top adviser on personnel issues.

Analysts say there's a small but real chance the imbalance could solve itself in a way that becomes a crisis of its own. Thirteen percent of the federal workforce—more than 100,000 workers—are now over the age of 60. At the departments of Education, Labor and Treasury, around 6 percent of the workforce is already over 65; at HUD, that figure is almost 9 percent. There’s only one possible conclusion to these trends: At some point, these workers really are going to retire. When they do, the agencies will lose decades of institutional knowledge across programs and jurisdictions, forcing them to compete for replacements in a tight labor market with a government more unpopular than at almost any point in its history.

After decades of predictions that haven't come true, most experts are reluctant to continue forecasting a retirement tsunami, but they are worried. One former Obama official described it to me as “more like termites in the basement as opposed to a wolf at the door”; Dan Blair, who was director of OPM during the George W. Bush administration, had a different metaphor. “I liken it to osteoporosis,” he said. “It may not affect day-to-day operations until something really breaks down.”

Washington has had decades to prepare for this moment, but despite real efforts by multiple administrations, nothing much has changed. When that tsunami hits, or the termites finally reach the foundation, Congress may finally start paying attention—but by then it might already be too late.

Correction: This article originally misspelled the name of the Government Publishing Office.

Authors: