Roger Ahlfeld’s long search for a job ended suddenly one afternoon with a phone call.

A senior executive at Tedeschi Food Stores called and asked him to be the Rockland company’s vice president of human resources. After more than two years of unemployment, Ahlfeld hardly hesitated, saying only he wanted to review the contract. Then he hung up the phone and jumped up and down, fist-pumping the air.

“I told the family, and I called my parents,” said Ahlfeld, 45, of Framingham. “My mother cried. They all knew it had been tough.”

Ahlfeld’s search was the subject of a Globe story in June highlighting the problems facing the long-term unemployed. Many are older, with significant work experience and a deeply ingrained work ethic, but they face a cruel Catch-22: The longer they are jobless, the harder it is for them to land a job.

Four years after the last recession ended, there are still about 4 million Americans who have been unemployed more than six months and are actively looking for work, said Andrew Sum, director of Northeastern University’s Center for Labor Market Studies. That number, Sum added, does not include millions more frustrated job seekers who have given up job searches and are no longer counted by the government as unemployed.

“The longer you are unemployed, the more difficult it is for you to become reemployed,” Sum said. “And these are the largest numbers in our history by far.”

Ahlfeld’s search tested the limits of his perseverance. He lost his job as a human resources executive in 2011, after his employer, Uno Restaurant Holdings Corp., the West Roxbury restaurant chain, declared bankruptcy. Ahlfeld was let go in a reorganization.

Although he expected the job hunt to be challenging, he believed his 20 years of experience in the restaurant business as well as a master’s degree in hospitality administration from Cornell University would serve him well. He worked with recruiters and scoured job boards looking for clues and connections. He networked with other unemployed professionals and built up more than 500 connections on LinkedIn. He became the group leader at weekly meeting for unemployed human resources executives.

But weeks of unemployment turned into months, then years. He kept plugging away, working in a tiny office next to his daughter’s bedroom that was just big enough for a desk, chair, and his 6-foot frame. He took a job as a volunteer on his town’s personnel board to help keep busy, scoured job boards, and mined his contacts.

On several occasions, he was one of three or four finalists for a job, but didn’t get the offers.

“The worst of it was really second-guessing myself, wondering if there was something about me that was keeping me from getting a job,” he said. “When you start questioning yourself, it’s scary. You have to maintain confidence.”

He relied on savings to pay the mortgage and clothe and feed his two children. His wife took a job waitressing at Outback to help pay the bills. But his financial situation “was getting scarier and scarier,” he said, so he widened his search, ready to move anywhere in the country for work, even if it meant uprooting his family.

He learned about the Tedeschi job posting on LinkedIn and applied fast. Someone in his networking group introduced him to a Tedeschi executive, who spoke with Ahlfeld privately about the company and its culture. In early August, another company executive called to set up a phone interview.

“I felt really good after that first call,” he said. “We had a great conversation and when you go long in an interview, it’s a pretty good sign.”

After a 3½-hour conversation with the human resources executive, who was moving to another position in the company, came a battery of interviews with other company executives spanning two days.

“I think over two days, I had about 12 hours of interviews,” Ahlfeld said. “It was exhausting but invigorating.”

Then came silence. Labor Day weekend came and went with no word from Tedeschi. It was nerve-wracking, he said, sitting in his quiet house day after day, his children at school, hoping that the phone would ring. About 200 people had applied for the job; he had made it to the final three.

And then, on an afternoon in mid-September, more than a month after his initial telephone interview, the call and job offer finally came. He accepted almost immediately.

“I wasn’t in any kind of bargaining position,” he said.

Peter Tedeschi, chief executive of Tedeschi Food Shops, said Ahlfeld’s empathetic and tactful style set him apart from the other candidates. Tedeschi, who left a senior vice president’s job at Putnam Investments to take over the company from his father, said he had to let go good employees in various rounds of layoffs in the financial industry, so he didn’t think unemployment necessarily tarnishes a long work history.

“Most executives that are open-minded and clear-thinking are very open to the idea the next superstar could be someone that is not in a position today,” he said.

Ahlfeld’s first day was Sept. 30. His compensation is on par with his earnings in his last job. In his new position as vice president of human resources, he oversees nearly 2,200 employees and franchisees.

His unemployment experience has made him want to do more to help the long-term unemployed, who often can’t get a second look from employers, he said. He wants to write a book or find another way to make executives rethink hiring policies. He also is considering a campaign to get companies to sign a pledge promising to give unemployed job candidates a chance.

“I’ve always been open to giving people chances, even more so now,” Ahlfeld said. “If I hadn’t gone through this, I wouldn’t know how difficult things are.”

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.