It sounds like some twisted Stephen King story: a state where very few people enter, but even fewer ever leave.

Cue the scary music and start poring over the data.

A Gallup poll released Wednesday shows that adults in Maine are less likely to want to leave the state than adults in just about any other state. Only residents of Hawaii and Montana are as loyal to their states, according to the poll.

Consider that Maine has the oldest population of any state, with a median age of 43.5 in 2012, and that in 2011 more people died here than were born here. That was the first time that had happened in 70 years.

The numbers suggest that, though Maine doesn’t get a ton of new residents, the ones it has stay until they’re good and old.

“It’s not an especially easy place to make a living, so I’ve always felt that people who come here really want to be here and they find a way to patch together a living,” said Vicki Doudera, 52, of Camden, a mystery writer and real estate seller who wrote the how-to guide “Moving to Maine” in 2000.

She said, “When we came to Maine (in the 1980s from Boston), we basically said, ‘We want to move to Maine, now how do we do it?’ ”

For its poll, Gallup questioned at least 600 people age 18 and older in each state, from June to December. It asked, “If you had the opportunity, would you like to move to another state, or would you rather remain in your current state?”

The states with the highest percentages of people wanting to bolt were Illinois and Connecticut. In Illinois, 50 percent said they’d leave. In Connecticut, 49 percent said yes to moving.

Only 23 percent of respondents in Maine, Montana and Hawaii said they would leave if they had a chance. States with only slightly more were Oregon, New Hampshire, Texas, Colorado and Minnesota.

Gallup, known for its national issue polls, began comparing states last year, said Art Swift, Gallup’s managing editor. Each state-by-state poll deals with a different issue, and this one was aimed at state migration patterns.

Nance Trueworthy, a Portland photographer, can relate to the crux of the poll. She came here in 1972, partly because her husband’s family was here. She fell in love with the state and stayed even after she got divorced and no longer had family ties here.

“As a photographer I could live anywhere and work, but I really have never wanted to live anywhere else,” said Trueworthy, who’s now 63. “The culture, the feeling, I don’t think I’d find anywhere else.”

Maine seems to have the quality-of-life factors that are prized by adults, especially adults with kids: low crime, no traffic congestion to speak of, open spaces and good schools.

Catherine Callender of South Portland grew up in Maine and remembers thinking as a teenager that she would leave and never come back. She went to college in Pennsylvania and lived in Boston for five years, with her husband. But once she had her first daughter, she began to think that Maine was exactly the kind of place she wanted to be.

“I loved living in Boston, but I didn’t realize how loud it was, how much time I spent in traffic, until I had an infant,” said Callender, 49, who is an architect. “I appreciate things like just having a backyard and having a five-minute walk to the beach.”

Blainor McGough, another Maine native who came back, worked as a boat builder and fisherman in places like Mexico and Florida. She was glad to see the world, but said she always realized she’d come back to Maine.

“When I came back and met my partner and had kids, I realized there was no place else I’d want to live,” said McGough, 39, a puppeteer who runs the Mayo Street Arts performance venue in Portland.

Charles Colgan, a professor of public policy at the University of Southern Maine who has studied state demographics for 30 years, said he wasn’t surprised by the Gallup poll. The state’s economy makes it difficult to attract new residents, he said, but the quality of life convinces people here to stay.

“The problem Maine has is getting people to come here in the first place, not getting people to stay,” Colgan said.

The poll results run counter to one aspect about Mainers, said Curt Mildner, president of Market Decisions, a research and polling firm that surveys Mainers on their habits and desires. He pointed to other polls that have shown people don’t have much confidence in Maine’s economy.

But he understands the “stay in Maine” mentality on a personal level. He came here in 1976 after working in northern New Jersey.

“I couldn’t watch the local news, because every night there was something like ‘Killer loose in northern New Jersey town, details at six,’ ” said Mildner, 61. “With an MBA, I probably could have gotten a job anywhere, but we wanted to come here. Look at all the things we have, without all the hassles.”

Ray Routhier can be contacted at 791-6454 or at:

[email protected]