Four engines from Cambridge, Linton and Cottenham were called to a fire in a room at the YMCA in Gonville Place.
Firefighters wearing breathing apparatus used two hose reels to extinguish the fire and a positive pressure ventilation fan to clear the smoke from the building.
Residents were evacuated before crews arrived and the fire started in a ground-floor room in the multi-storey building.