SEATTLE — Alan Naiman was known for an unabashed thriftiness that veered into comical, but even those closest to him had no inkling of the fortune that he quietly amassed and the last act that he had long planned.

The Washington state social worker died of cancer this year at age 63, leaving most of a surprising $11 million estate to children’s charities that help the poor, sick, disabled and abandoned. The amount baffled the beneficiaries and his best friends, who are lauding Naiman as the anniversary of his death approaches in January.

That’s because the Seattle man patched up his shoes with duct tape, sought deals at the grocery store deli at closing time, and took his best friends out to lunch at fast-food joints.

Naiman, who died unmarried and childless, loved kids but also was intensely private, scrimping, investing and working extra jobs to stockpile money that he rarely spent on himself after seeing how unfair life could be for the most vulnerable children, his friends say.

They believe a lifelong devotion to his older brother who had a developmental disability influenced Naiman, though he rarely spoke of it. The brother died in 2013, the same year Naiman splurged on a sports car — a modestly priced Scion FR-S.

“Growing up as a kid with an older, disabled brother kind of colored the way he looked at things,” close friend Susan Madsen said.

A former banker, Naiman worked the past two decades at the state Department of Social and Health Services, handling after-hours calls. He earned $67,234 and also took on side gigs, sometimes working as many as three jobs. He saved and invested enough to make several millions of dollars and also inherited millions more from his parents, said Shashi Karan, a friend from his banking days.

Thrilled when he finally qualified for senior discounts, Naiman bought his clothes from the grocery store. He loved cars, but for most of his life, drove beat-up vehicles and seemed to enjoy the solitude and savings of solo road trips, friends say.

After Naiman’s death, Karan realized how little he knew of the other aspects of his longtime friend’s life.

“I don’t know if he was lonely. I think he was a loner,” Karan said.

Many of the organizations benefiting from Naiman’s gifts said they didn’t know him, though they had crossed paths.

He left $2.5 million to the Pediatric Interim Care Center, a private organization in Washington state that cares for babies born to mothers who abused drugs and helps the children wean off their dependence. The group used some of what was its largest donation ever to pay off a mortgage and buy a new vehicle to transport the 200 babies it accepts from hospitals each year.

Naiman had called the center about a newborn while working for the state more than a decade ago and its founder, Barbara Drennen, showed up in the middle of the night to get the baby.

“We would never dream that something like this would happen to us. I wish very much that I could have met him. I would have loved to have had him see the babies he’s protecting,” Drennen said.

Naiman gave $900,000 to the Treehouse foster care organization, telling the group that he was a foster parent years ago and had brought kids in his care to its popular warehouse, where wards of the state can choose toys and necessities for free.

Treehouse is using Naiman’s money to expand its college and career counseling statewide.

“The frugality that he lived through, that he committed to in his life, was for this,” said Jessica Ross, Treehouse’s chief development officer. “It’s really a gift to all of us to see that pure demonstration of philanthropy and love.”