Crews from multiple fire departments battle a three-story apartment building fire at 10 Bell St. in Berwick on Friday. Credit: Kyle Stucker | Seacoast Online

Berwick Fire Department Capt. Joel Barnes died fighting an apartment fire in Berwick on Friday, the first firefighter to die on the job in Maine since an East Millinocket captain’s death exactly three years ago.

Four other firefighters were taken to Wentworth-Douglass Hospital in Dover, New Hampshire. They were treated and released later that day, said Stephen McCausland, spokesman for the Maine Department of Public Safety.

The cause of the fire remained under investigation as of Saturday. A team of investigators from the federal Bureau of Alcohol, Tobacco and Firearms is assembling and will be on-scene sometime next week to assist local investigators, McCausland said.

“That’s the federal agency that investigates fires,” McCausland said. “They have come in a number of times through the years, primarily for large industrial fires. A firefighter’s death meets their criteria to assist a local entity, so they will be coming in.”

The 32-year-old’s body has been taken to the New Hampshire Medical Examiner’s Office in Concord for an autopsy. Barnes is survived by his mother, father and sister.

The 4-alarm fire started just before 11 a.m. on Bell Street, and the majority of the 75 firefighters on scene quickly went from containment to a rescue operation of firefighters.

Berwick Fire

WATCH: Aerial footage of the scene of the fire on Bell Street in Berwick. (Courtesy: WBZ) >

Posted by WGME CBS 13 News, Portland on Friday, 1 March 2019

When the fire broke out, several people fled their apartments. All of the apartment building’s tenants made it out safely.

Before Friday, Maine had not had a firefighter fatality since 2016. On March 2, 2016, Capt. Peter Larlee of the East Millinocket Fire Department had a heart attack at the fire station and died.

Tributes and condolences sprang up on social media as the news spread of Barnes’ death. Firefighters from as far away as Florida praised Barnes for his courage and sacrifice. News reporters tweeted pictures of the sign at the Berwick Fire Department draped in black cloth and of flowers left at the fire station and at the scene of the blaze.

The Woolwich Fire Department ran on its Facebook page a picture from the fire scene showing 11 firefighters using four ladders “in a very dangerous space doing all they can to rescue one of their own.

“We can see that no one in this picture is thinking about their own life and only thinking about saving one of their own. We see that the fire is still burning around them and one unseen firefighter still using a hoseline to keep the flames back while his fellow firefighters work to save one of their own,” the caption reads. “Full-time or volunteer, we are all the same when the alarm comes in, and we all will do whatever it takes to get the job done, and if the unthinkable happens, we will all do whatever it takes to save one of our own or any life.”

The York County Emergency Management Agency tweeted, “Our deepest condolences & support go out to the department & all those who cared about Joel. We are so sorry for your loss… #Berwick.”

“His final action was shielding a firefighter he was trapped with. That FF made it out,” according to one Twitter comment.

“Today Myrtle Beach Fire honors him one last time by assigning him to our rigs for one final ride. Captain Joel Barnes LODD 03/01/2019,” Myrtle Beach Fire Department tweeted.

FEMA has kept records since 1990 about firefighter deaths in Maine. Those records show 18 firefighters have died in Maine since then. It is now 19.

WGME contributed to this report.