The Janesville Fire Department says firefighters were dispatched to a multi-family residence on the 200 block of North Franklin Street just before 9:30 Wednesday night.
Captain John McManus says a basket of clothing started on fire in a closet when the sprinklers kicked in and doused the flames.
McManus said the fire could have caused a lot of destruction had the sprinklers not worked. He estimated the building had about $1,000 in water damage from the sprinkler system.
About 10 to 12 people were displaced. The Red Cross helped the residents find overnight shelter.
The fire remains under investigation.