The fire began about 10 p.m. Saturday at the old Columbia Hotel, which currently has apartments on its upper levels and businesses below, The Boston Globe reported.
The injured firefighters were in a bucket on a ladder truck when a wall collapsed onto them, Leominster Fire Chief Robert Sidleau said. They were transported to the Health Alliance Hospital in Leominster and medics told him they appear to be OK.
All of the residents made it out of the building safely without injury, Sidleau said.
The Leominster fire officials called in mutual aid from more than a dozen surrounding cities and towns, Sidleau said, including Fitchburg and Shirley. Firefighters worked into Sunday to get the fire under control.
The cause was under investigation.