David Migneault, of Garland (center) laughed as he plays Rummikub with his wife, Peggy, (right) and friend Alden Bent, of Dover-Foxcroft downstairs in Central Hall in Dover-Foxcroft, Maine. Jessica Rinaldi/Globe Staff/Globe Staff

DOVER-FOXCROFT, Maine — Ted Marshall, 87, allowed his Maine stoicism to lapse for an instant, pursing his lips in a flicker of emotion. He thought of the friends he had lost and the spouses they left behind, elderly men and women who now live alone in the oldest county in the country’s oldest state.

“It hasn’t been easy for them,” Marshall said, sitting with his wife, Jane, in an 18th-century home beside the frozen Piscataquis River.

The couple are active at an age when many of their peers have slowed almost to a stop. Ted Marshall, an Army veteran whose only time “away” was during the Korean War, still cleans carpets for a living and even plows snow from his neighbors’ driveways for free.

But across the state, the rapid aging of Maine’s population — a trend known by some as the “silver tsunami” — has reached a crucial tipping point, many say. As baby boomers head into retirement, and many young people move away in search of opportunity, Maine is one of only two states, along with West Virginia, where deaths now outnumber births.

That gulf is reshaping life here in myriad ways, from shrinking the workforce to intensifying the demand for services for the elderly, and it will only widen in the coming years, demographers predict.

Already, Maine has more residents 65 and older than 18 and younger. By 2026, the number of residents over 65 is expected to skyrocket by 37 percent from its level in 2016, while nearly every other age group declines, partly the consequence of rising life expectancy and falling fertility rates.

Seniors attended a weekly community lunch at The Commons. Jessica Rinaldi/Globe Staff/Globe Staff

“I don’t think there will be a leveling-off point soon,” said Ken Johnson, a demographer at the University of New Hampshire who studies population trends.

Across the state, municipalities are struggling to fill jobs from a static labor pool, competing for police officers, firefighters, and even snowplow drivers. Health care providers are scrambling to find workers, and local taxes are rising, some of them to finance programs for older residents.

“We’re definitely under the gun,” said Jessica Maurer, executive director of the Maine Council on Aging. “It’s a mixed bag, because there’s obviously really good news in that we’re living longer than ever. But we haven’t done a good job of planning for what’s next.”

A man walked down East Main Street in Dover-Foxcroft, Maine. Jessica Rinaldi/Globe Staff/Globe Staff

That appears to be changing in Piscataquis County, where the median age of 51.6 years in 2017 topped that of any other county in Maine, which had the oldest median age in the country, 44.7.

In the Piscataquis County seat of Dover-Foxcroft, the issue is being confronted head-on, making the former mill town of 4,200 people a laboratory for rural, aging areas across the country that will face similar problems in the years ahead, especially in small-town New England.

“We are at the demographic frontier,” said Dr. Lesley Fernow, a retired internist who is a local leader on aging issues. “We’re being forced to embrace all of this because we don’t have an alternative.”

A town survey in 2015 found that transportation is the most important concern for older people, followed by food needs, isolation, and access to cellphone and Internet service.

Transportation has been studied repeatedly here to help older people get around — to doctor’s appointments, the market, and community activities. In addition, planning is underway to create a community center where older people who need extra care can find services, social stimulation, and a few hours away from home to provide a break for their caregivers.

Ted Marshall, 87, and his wife, Jane posed for a portrait inside their home. Jessica Rinaldi/Globe Staff/Globe Staff

The town’s Central Hall, built in 1883, has been transformed into an all-generations gathering spot called the Commons. Its offerings include quilting, trauma workshops, tai chi, wellness classes, Wednesday lunches, and monthly contra dances where up to 100 people, from toddlers to those in their 90s, stomp around the rebuilt floor.

“There’s a heart and a healing in the generations being together and teaching each other,” said Tara Smith, a 43-year-old mother of two who is executive director of the Commons. “I feel my whole social life is more rounded than it’s ever been. Some of my best friends are 20 to 30 years older than me.”

Overall, Maine’s median age is nearly seven years older than the national figure of 38.0. Looked at another way, the difference between the median age in the United States and in Piscataquis County, a remote expanse the size of Connecticut with just 17,000 people, is the gap between a newborn and a high school freshman.

Joan Shapleigh, 81, attends quilting classes as well as community meals, where older people predominate. She lives alone in a renovated former mill — four tall windows in her living room look out on the river, a white New England church, and a large red wooden barn.

Shapleigh said she feels fortunate that two of her children remain in a town that many others have left. She sees the effects on other seniors who do not have family close by, who live in old Maine homes that are big on space but short on company.

“There is isolation and depression and illnesses that aren’t caught in time,” Shapleigh said.

Exacerbating their struggles is the area’s strapped economy. Piscataquis County has a median household income of $36,938, compared with $50,826 for the state. Jobs are hard to come by, and nearly a third of the county's children live in poverty.

“I know a lot of people who have a difficult time,” she said.

By 2026, Piscataquis County is projected to lose 11 percent of its 2016 population, by far the largest drop of any county in the state. While the southern counties of York and Cumberland, which includes Portland, are expected to grow by 6 percent and 3 percent, respectively, Maine’s overall population is projected to climb less than 1 percent.

Vermont and New Hampshire also are aging significantly, prompting Vermont to offer as much as $10,000 for 100 people to move there this year and work remotely. The three states in northern New England lead the nation in the percentage of non-Hispanic white residents, a group whose birth rate lags far behind that of Hispanics, the country’s largest ethnic minority and a driver of population growth.

And while Maine’s unemployment rate hovers near record lows, the shrinking pool of younger labor is pushing many of the state’s 522 cities and towns to brainstorm for ways to fill jobs.

In Augusta, the state capital, some waste-disposal workers are being offered city-paid training — several thousand dollars’ worth for a commercial truck-driving license — to operate snowplows.

“We just can’t recruit seasonal drivers,” said Raphael St. Pierre, assistant city manager. For the last two winters, an informational technology administrator paid $75,000 by the city has agreed to help plow snow on the side for additional pay.

The state Department of Transportation has 38 openings for full-time drivers, according to state Senator David Miramant, a Democrat from Camden who has filed a bill to raise their pay, which starts at $14.37 an hour.

“That used to look pretty good,” Miramant said. But not anymore, when deep-pocketed competitors such as Amazon and UPS are willing to pay much more for similar jobs.

In Augusta, firefighter-paramedics have received 30 percent raises over two years; police supervisors, 25 percent; and police officers, 20 percent, in an aggressive bid to retain and recruit them. That increase in spending equates to a 3 percent rise in property taxes, according to city manager William Bridgeo.

Applications for city vacancies have plummeted.

“In the past, we would receive a couple of hundred applications for a full-time job opening. Family and friend referrals would roll in. Now, we are lucky to get 10,” said Barbara Gabri, the city’s human resources director. “Recently, we advertised a management position and received just a handful of resumes, three of which did not meet the essential qualifications.”

Library hours have been scaled back, and the waiting list at the city-run day-care center is growing because of a staff shortage. “We’ve got to bring in more young people. We can’t grow them,” Bridgeo said. “We also have to invite immigrants in. We have to become a far more welcoming society in Maine. I think that’s part of the solution.”

In Dover-Foxcroft, 75 miles to the north, work is well under way to address — if not solve — the many needs of its aging population. It’s largely uncharted territory, but a vigorous discussion has begun.

Ted Marshall believes he has part of the answer. For him, it’s staying busy.

“If I was spending time sitting in that chair, I probably wouldn’t be here,” Marshall said, nodding toward a comfortable corner of the house. “For me, that’s the bottom line.”