Fire, fanned by seasonable winds, ripped through 11 homes late Tuesday and early Wednesday in the settlement of El Futurito in San Rafael de Alajuela.
The Cuerpo de Bomberos said that 27 adults and 18 youngsters were left homeless.
The cause was reported to be ignition of combustible materials from a candle in an upstairs bedroom.
Fire fighters from a number of stations spent more than 40 minutes trying to control the blaze. The homes were mostly wood frame covered with sheets of metal. Flames soared high in the air, and sparks rained on nearby homes.
Firefighters said they were able to save about two-thirds of the settlement of low-income homes.
Candles have been the sixth most frequent cause of fires so far this year, said the fire agency.
By far the most frequent cause is a failure in an electrical system, followed closely by leakage of petroleum gas. Other frequently causes are shorts in electrical devices, sparks from outdoor burning and sparks from a welding torch.
Of the six persons who died in fires this year, five deaths were attributed to the use of candles.
Using candles is not unusual in areas where electrical service might be spotty.