But if you stripped out gains at health care and social assistance employers, job losses would have exceeded 20,000 — or nearly one in five of the positions added in the two years before that.

What’s happening: In a rare divergence, hiring in Massachusetts has dried up in many sectors even as the economy expands.

The same disconnect occurred after the 2008-2009 financial crisis and the earlier dot-com bust. But those episodes followed a recession, with employers reluctant to boost payrolls despite rebounding consumer spending, government outlays, and business investment.

Today, the economy has been growing with little interruption since the fall of 2020. Yet employers have hunkered down for a host of reasons, including trade and regulatory policy uncertainty, the looming impact of AI on labor needs, high borrowing costs, and low consumer confidence.

Massachusetts was among the first states to experience this so-called jobless expansion — a dichotomy between weak employment and healthy growth that the country is now facing for the first time since at least World War II.

The US added an anemic 181,000 jobs last year. Without health care and social assistance (roles including social workers, counselors, and personal care aides), employment would have declined by more than a half million jobs.

Why it matters: Massachusetts has long benefited from an enviable mix of high-paying and often interrelated jobs in health care delivery and medical research; higher education; professional and business services (a sector that includes law, engineering, technology consulting, and biotech); and finance.

But over the past two years these engines of the economy, with the exception of health care and social assistance, saw little or no employment growth.

The professional and business services sector lost 8,000 jobs, mostly among scientific and technical workers.Private education shrank by 2,200 jobs. Hiring in the college and university subgroup was positive but slowed dramatically from prior years.Employment in financial activities — including banking, insurance, and real estate leasing — was little changed.

There were modest job gains in a few other sectors, but health care and social assistance was by far the biggest generator of jobs in the state. The US Bureau of Labor Statistics’ annual revision of state-level employment — scheduled for release in April — will likely show jobs losses in Massachusetts were worse than currently reported.

The health sector added 15,600 jobs in 2024-2025, most in direct patient care. It accounted for 17.6 percent of all Massachusetts employment at the end of last year, nearly 3 percentage points above the national average.

The jobless expansion is likely to continue this year, with health care the most notable exception amid strong demand fueled by the escalating needs of aging baby boomers.

“We continue to need more patient-facing staff to care for the growing demand for clinical services, including for an aging population and those with acute care needs,” said Niyum Gandhi, chief financial officer at Mass General Brigham, the state’s largest health system.

A warning: The state’s reliance on a single sector isn’t, well, healthy.

Health care employment has historically been recession-resistant because people always need medical care, but it’s not immune to policy changes. Proposed cuts to Medicaid and potential reductions in federal health and research spending could undercut the sector’s ability to keep hiring at the current pace. If health care hiring slows and no other sector picks up the slack, the labor market has no fallback.

The deeper concern is what the concentration reveals about the rest of the economy. Employers in other sectors are sitting on their hands. The lack of hiring has helped push the state’s unemployment rate to 4.8 percent in December from 4.1 percent a year earlier.

Some of the hesitation reflects a cyclical downturn in industries such as tech, pharma, and biotech, which went on hiring binges during and after the pandemic. Also at play are uncertainties created by shifting US trade policies, the Trump administration’s campaign to force changes in admissions and hiring in higher education — threatening federal funding cuts — and the rapid acceleration of AI’s capabilities.

“Massachusetts is losing momentum,” said economist Alan Clayton-Matthews, senior contributing editor at MassBenchmarks, a research project at University of Massachusetts Amherst’s Donahue Institute. The shifting economic landscape is “weighing on the psyche of consumers and businesses,” he said.

What’s ahead: Clayton-Matthews said Massachusetts will likely face stiff headwinds from President Trump’s tight restrictions on immigration and mass deportations of people in the country illegally.

Combined with an aging population, employers may struggle to find enough workers if the labor force shrinks as Clayton-Matthews expects.

Final thought: The “Massachusetts Miracle” of the 1980s — when the state transformed from a down-and-out, deindustrialized economy into a technology- and education-driven powerhouse — is ancient history.

Now we’re struggling to keep our head above water. At some point, exhaustion sets in — and a state that has always prided itself on out-thinking its problems will need more than one sector to carry us to shore.

Larry Edelman can be reached at larry.edelman@globe.com.