A candle left burning in a south Santa Rosa apartment sparked a fire Thursday afternoon when no one was home.

But the candle was near a bedroom window, which shattered under the heat and began emitting smoke, alerting neighbors to the blaze, Central Fire Battalion Chief Joe Giordani said.

The 5 p.m. fire was on Butterfly Lane off Santa Rosa Avenue. It was largely contained to the bedroom but caused an estimated $40,000 in damage to the structure and contents, Giordani said.