The tragedy of a Maine firefighter who was fatally injured while shielding a colleague from flames was compounded Sunday by the death of a fire chief who suffered a medical emergency at the memorial service.

Oxford Fire Chief Gary Sacco suffered the emergency as several thousand people, including hundreds of firefighters from across New England, gathered to honor Berwick Fire Capt. Joel Barnes' sacrifice. Barnes was fatally injured in a four-alarm fire earlier this month.

Maine Medical Center spokesman Matt Wickenheiser confirmed that Sacco was stricken at the funeral, rushed to a hospital and pronounced dead in the emergency room. No further details have been released.

"Our hearts, already broken by the loss of Captain Joel Barnes, also mourn the loss of Oxford Fire Chief Gary Sacco. In a testament to his own character, Chief Sacco lost his life while honoring that of his fallen brother, fellow firefighter Captain Barnes," Mills said. "I join with people across Maine in offering my thoughts and prayers to Chief Sacco's family and friends, the Oxford Fire Department, and all of Maine's first responders. The State of Maine has given two of its best to the Heavens."

Barnes made the "ultimate sacrifice," Berwick Fire Chief Dennis Plante said.

"He is my hero," Plante said.

The service was held at the Cross Insurance Arena, one of the few venues in Maine big enough to host such a large gathering. The 32-year-old Barnes was the first firefighter to die while battling a fire in at least three decades in Maine.

Barnes' uncle, also named Joel, grew teary as he described a nephew who grew up dedicated to serving the community as a firefighter. He recalled how an elderly neighbor once gave a plastic firefighter hat to then-toddler Joel, who soon became "obsessed" with studying fire science books and preparing himself for a career that took him from Maine, to Massachusetts, to South Carolina and back to his family in Maine.

"Without hesitation, he gave his life to save the life of another firefighter," Barnes said. "And he did it in the most selfless, courageous way possible."

Maine Gov. Janet Mills lowered flags to half-staff to honor Barnes. She said his life and service exemplified "unfaltering courage, selflessness and love for his fellow man."

The day started with a private Mass for Barnes in Old Orchard, where he grew up. Then a procession escorted Barnes' body up I-95 to South Portland, where the casket was placed in a fire truck.

From there, the procession headed across the Casco Bay Bridge where fire boats saluted Barnes en route to the civic center.

Barnes was one of two firefighters who encountered a wall of flames on the third floor and had to be rescued during a March 1 four-alarm fire in Berwick, Maine. Five firefighters were injured that day, and Barnes died at a hospital in New Hampshire.

Saco Fire Chief John Duross said when officials finalize the investigation into the March 1 fire, the paperwork will demonstrate "one common theme," the heroism of Barnes.

"We vow to never forget," said Duross, also president of the Maine Fire Chiefs Association.

Barnes' work ethic, dedication and attention to detail gained him respect among colleagues and his community, his loved ones and co-workers said Sunday. Barnes loved teaching kids about fire safety and firefighting as a member of the department's fire prevention team, according to Plante.

Before the service, Berwick Capt. Travis Doiron joked that Barnes' attention to detail included a spotless truck. Barnes ensured that the trucks were wiped down so there were no water spots after a washing.

His death marked the first fatality of a Maine firefighter while battling a blaze in decades, said Stephen McCausland of the Maine Department of Public Safety.

The last time it happened was in 1980 when Portland Firefighter Joseph Cavallaro Jr. died of burns and asphyxiation while fighting a three-alarm fire at the Phoenix Nightclub, McCausland said.

___

Associated Press writer David Sharp in Portland, Maine, contributed to this report.