Firefighers from Kanawha and Putnam County responded to the blaze around 4:30 a.m. at the Unity Apartments in Cross Lanes.
The fire broke out in the bedroom of one unit, but the sprinkler quickly had the fire under control even before the fire department arrived. Nitro Fire Chief Casey Mathes said had it not been for the sprinkler, the early morning fire very likely would have claimed several lives.
Twenty-seven residents of the apartment building located on Big Tyler Road were evacuated. They were allowed to reurn home after about an hour.
Investigators said the fire is blamed on smoking in bed.