A fire ripped through a multifamily home in Boston, sending five to the hospital and displacing more than two dozen residents, officials said.

The blaze in the three-story building in the city's Mattapan neighborhood was reported just after 7 p.m. Sunday, the Boston Fire Department posted on social media.

BOSTON POLICE IDENTIFY SUSPECT ACCUSED OF SHOOTING RESPONDING POLICE OFFICER: ‘NO RESPECT FOR LIFE’

Crews arrived on the scene to find the rear of the home engulfed in flames and thick black smoke blanketing the neighborhood. Firefighters mounted "an aggressive interior and exterior attack" to prevent the blaze from spreading to nearby buildings, the department said.

Massachusetts Fox News graphic

A fire at a multifamily home in Boston has left three of its residents and two responding firefighters injured.

Most residents had made it out of the building when firefighters arrived, but three residents and two firefighters were taken to the hospital with minor injuries.

"It is a good thing that everybody got out because if this was like in the dead of night it could have been a lot worse," Deputy Fire Chief Brian Tully said.

MA MAN, 18, CHARGED WITH SENDING OVER $1K IN GIFT CARDS TO FED POSING AS ISIS OPERATIVE

The porches at the rear of the building collapsed and the fire left the home charred and melted the siding.

The cause remains under investigation.

CLICK HERE TO GET THE FOX NEWS APP

The Red Cross helped the displaced residents find accommodations.