HAMPTON, N.H. (AP) — A New Hampshire police chief killed in the line of duty was remembered Thursday as a hero who put fellow officers’ lives first, a devoted family man and a dear friend.

Thousands of people gathered to attend a memorial service in Hampton for Greenland Police Chief Michael Maloney, who was days away from retirement when he was fatally shot last Thursday.

Greenland Police Chief Michael Maloney (Photo from Greenland PD)

Maloney was with a special team of drug task force officers trying to serve a search warrant at a home; four of the officers were injured in the gunfire and he was shot in the head. The injured officers are out of the hospital and attended the service, where they too, were honored. Words of thanks also went out to Police Officer Daniel Doherty, who is recovering from multiple gunshot wounds suffered in a separate incident last month as he ran after a man in a Manchester neighborhood.

Among the speakers at the Winnacunnet High School athletic field where Maloney once played football was U.S. Attorney General Eric Holder. He said when the drug task force team was preparing to confront “a dangerous criminal with a history of violence,” Maloney chose not only to be involved, but lead the dangerous operation.

WBZ-TV’s Karen Anderson reports

“But even when his comrades were wounded, Chief Maloney did not fall back,” Holder said. “He stood his ground and stayed with his team — working to help the others to safety.”

The man inside the house, Cullen Mutrie, killed himself and his girlfriend, Brittany Tibbetts. Court records show that police believed both Mutrie and Tibbetts were involved in selling more than 500 prescription pills every few days from his home.

New Hampshire Attorney General Michael Delaney called Maloney a friend a trusted colleague and a role model. “Through his bravery and swift action, he has humbled us, inspired us, and shown us what it means to fulfill a law enforcement oath to serve and protect,” he said.

Most the speakers brought up Maloney’s love for his family and community. Photos shown of Maloney in the past week included one of him holding his newborn grandson and namesake, Michael Jacob — or M.J.

U.S. Sen. Kelly Ayotte said as a mother, that photo caught her attention more than anything else. She said people will tell M.J. when he grows up that his grandfather was a great human being who loved his family and a loyal friend who cared about his community and had compassion for the people he served.

Fellow law enforcement officers and a retired judge remembered Maloney as a commander who wasn’t afraid to speak his mind, but also had the confidence to remain in the background and allow others he worked with to do their jobs. They also talked about his love for the New England Patriots and fishing.

WBZ NewsRadio 1030’s Kim Tunnicliffe reports

Retired Judge Francis Fraiser of Hampton District Court recalled the years when Maloney was police chief there before going to Greenland. He said for many years, Maloney directed traffic in front of his home during an annual fair, and the two would greet each other as Fraiser headed off to cut watermelon. It was an annual ritual. He described those moments as a “Rockwell-type scene” that represents the flavor of New Hampshire. “It is a slice of Americana and I will miss it greatly,” he said.

Tim Maloney, Maloney’s younger brother, said one of his favorite things to do was spend time with his brother in his police cruiser. He recalled how his big brother prepared a pre-ride checklist, telling him he couldn’t touch the lights, turn on the siren or get a badge.

“I think he would be deeply touched by the show of support and love from all you,” Tim Maloney said.

Copyright 2012 The Associated Press.