A housing site for formerly homeless people was evacuated Saturday night after a sprinkler pipe burst, displacing all 50 tenants, according to the Boston Fire Department.

The large three-story building, located in Jamaica Plain, is run by the Pine Street Inn, an organization that provides housing for the homeless.

Firefighters responded to the call at 6:09 p.m. Department spokesman Steve MacDonald said that water flowed from the top-floor pipe to the basement, causing portions of ceilings to collapse and prompting the fire department to shut off the building’s utilities.

MacDonald told the Boston Globe, the issue was a “direct result” of the frigid temperatures the region has faced. “The water freezes, and when it freezes, it sometimes causes small cracks in the pipes,” he said. “

The Massachusetts Bay Transportation Authority sent two buses to transport the displaced residents to new locations for the night, MacDonald said. While waiting for the buses, the building’s tenants stayed inside the building due to the cold.

Jennifer Harris, a spokeswoman for the Pine Street Inn, said that 22 tenants were taken to Hotel 140, located in the YWCA building at 140 Clarendon St., where the fire department also responded to a water leak that caused an electrical issue on Saturday.