When Lonnie McCaffrey looks back, he sees a path where he might not have even graduated high school.

But for McCaffrey – now a prosecutor with the Raymond Police Department – and so many others, Scott McGilvray stepped in.

McGilvray, who was McCaffrey’s football coach in 1992 at Manchester Memorial High School, pulled the teenager aside after his father showed up to a practice “completely annihilated,” a sign of his drinking problem. McGilvray offered to help and eventually let McCaffrey move into his spare bedroom.

That was one of many reminiscences about McGilvray on Wednesday, the day after the 51-year-old Democratic state senator from Hooksett died at a Boston hospital.

“I would definitely, definitely not be in this position without him,” McCaffrey said. “So I’m forever grateful.”

McGilvray was an educator, coach, community leader and first-term senator representing Bow and Dunbarton, along with parts of Manchester, Candia and Hooksett. He was also president of the New Hampshire chapter of the National Education Association, the state’s largest teacher’s union.

Before McGilvray ascended to the top of the union and the halls of the Senate, he helped struggling friends anyway he could. People close to him remembered those moments Wednesday.

“His room was always a place that you could go,” McCaffrey said.

That’s what Gene Martin remembered, too. Martin, a former Democratic Party operative, helped McGilvray win his Senate seat last year. But back in 2002, he was in McGilvray’s social studies class at Memorial.

“If you were out of school for a few days, he would be the first to pull you aside in the hallway and ask you what was going on,” Martin said.

McGilvray spent more than two decades at Memorial, where he was the Manchester union steward, before taking over the state’s NEA chapter. Memorial is where he met Phil Sapienza, a longtime friend who now teaches at Hillside Middle School in Manchester.

He said McGilvray “never put himself first.”

“He always looked out for others, made sure everybody was taken care of. He had a sense of who needed help,” Sapienza said.

Ben Dick took over as the head of the Manchester NEA chapter for awhile once McGilvray left.

“He was the kind of person that always, always thought about how something would affect the greater good,” Dick said.

And McGilvray always took care to credit a team larger than himself “even if it wasn’t justified,” Dick said.

“If I did anything well in the union role, I learned it from Scott McGilvray,” he said.

McGilvray is survived by his wife, Patti, and two adult daughters.

Republican Gov. Chris Sununu said he was “deeply saddened” to hear of McGilvray’s passing, and ordered flags to fly at half-staff Wednesday in his honor.

“He was a dedicated public servant and we send our most sincere condolences to his family and friends,” Sununu said in a statement.

State legislative leaders, members of New Hampshire’s Congressional delegation, and the union released statements Wednesday morning reflecting on McGilvray’s time as an educator, coach and community leader.

“Sen. McGilvray was well respected within his community and has touched countless young lives through his dedication to education as well as coaching youth sports,” Republican Senate President Chuck Morse wrote in a statement. “Losing a member of the Senate is always difficult and the loss of Sen. McGilvray so early in his career is especially sad.”

Democratic Senate Minority Leader Jeff Woodburn called McGilvray’s three months of service “too brief.”

“He devoted his life to teaching, coaching, and advocating for our children and he left an indelible impression with all he worked with,” Woodburn said. “I was proud to serve with Scott in the New Hampshire Senate and saw firsthand his dedication to the people of his district and the people of New Hampshire.”

Republican House Speaker Shawn Jasper said in a statement that McGilvray was “extremely dedicated to the youth of our state.”

“While serving in the Senate, although for just a matter of weeks, Scott quickly earned the respect of everyone who worked with him, from his fellow senators to lobbyists to members of the general public,” Jasper wrote.

McGilvray had recently taken a leave of absence from his duties as NEA-NH president last month due to health problems, although he said at the time that he would not do the same for his Senate seat.

“It has become necessary to prioritize my health over my job for the time being, but my first priority will always be to serve the people of Senate District 16,” he said in a statement. At the time, McGilvray didn’t divulge any details about his health and asked the public to respect his privacy on the matter.

McGilvray had been excused from last week’s Senate session.

Per the New Hampshire Constitution, it will be up to the Sununu and the Executive Council to set the date for a special election to fill McGilvray’s seat.

McGilvray defeated Republican competitor Joe Duarte last November to win his first term in the state Senate. The District 16 seat had previously been held by Republican David Boutin, who retired. McGilvray was the only Democratic candidate to flip party control of a Senate seat in the recent election.

(Allie Morris contributed to this report. Ella Nilsen can be reached at 369-3322, enilsen@cmonitor.com or on Twitter @ella_nilsen.)