Through unimaginable tragedy, quarterback Tom Brady and his Patriots teammates rallied to help the family of a slain Massachusetts police officer pull itself back together.

Tricia Tarentino’s husband, Ronald, was shot and killed in the line of duty last May 22 while on patrol in Auburn, leaving her with their three boys to raise alone.

That’s when Brady stepped in.

Brady and his Patriots pals rallied to help a cause that raised $86,000 for the fallen officer’s family. Brady donated a signed home-game jersey that sold for $6,000 at a fundraiser, with Julian Edelman and Rob Gronkowski also pitching in gear.

But it was Brady who started the goodwill flowing.

“That immediate response shows where his heart is at, and that Ron’s death has made an impact on him as well,” Tricia Tarentino told the Herald yesterday. “Ron was just that kind of person. He had an amazing personality and wanted to reach out to help others. I think that’s why so many people have responded to this tragedy. It’s just a great loss.”

Tarentino said Brady’s generosity also lifted her boys’ spirits when they needed it most.

“They’ve grown up watching Tom Brady and looking up to him,” Tarentino said of her sons, Ronald III, 21; Spenser, 18; and Kyle, 15. “I can’t even tell you how great their response was. They were blown away. They were so excited. He is a role model that my boys will now, because they have that personal connection, will always look up to more than they already did.”

It’s a reminder of how Brady’s commitment to the region goes beyond Sundays on the football field.

“We have the deepest gratitude for his kindness and generosity. Just reaching out to our family in our time of need is unbelievable,” she said. “We’re so fortunate that he is part of the greater New England family and was kind enough to donate his time to do this. To be there for us, it means a lot to us.”

So here’s how it all unfolded.

Ronald Tarentino Jr. and childhood friend Rob Bjorkgren grew up together in Tewksbury, where Bjorkgren is currently a police officer.

Tarentino worked for the Leicester Police Department before joining the Auburn force. A few days after Tarentino was killed during a routine traffic stop and his suspected shooter was gunned down, Bjorkgren’s wife, Nicole, mustered up the courage to approach Brady at his annual Best Buddies bike ride.

Nicole asked Brady for 10 seconds of his time. He stopped and looked intently in her eyes as she explained the Tarentino tragedy.

“I really want to help,” Brady told Nicole.

“I couldn’t even believe it was coming out of my mouth,” Nicole recalled. “I can’t say enough about him as an individual.”

A mutual friend — Marc Ginsburg, owner of the Tewksbury Country Club — then helped out and Brady’s jersey was soon on the way.

“Nicole is such an amazing woman,” Tarentino said. “She’s got the biggest heart, and she was just trying to help us in any way that she could.”

Three weeks later, Brady mailed them the home-game Patriots jersey, which he autographed on the back, to use for the auction. Edelman then found out and shipped over a signed football. Gronkowski caught wind of it and asked Rob Bjorkgren to come to his house to pick up his own signed jersey.

Brady’s jersey was the most coveted item of the Aug. 11 event. Due to the overwhelming support, Tricia Tarentino has since reached out to the families of fallen first responders to assist.

She understands too well the pain of such a loss as well as the elation of a community that works selflessly to pick up a family in need.

Tarentino’s emotions are wide-ranging 11 months after her husband’s death, but the family simply wants to say thank you to Brady and the Patriots who came to their aid.

“It meant the world to my family and myself,” she said. “I know they don’t know us, but the fact that they did that to show support for another family in Massachusetts clearly shows they value family.”