Residents of a Costa Mesa duplex were burning candles and sage to ward off evil spirits just before a fire broke out Tuesday night, fire officials said.

Costa Mesa firefighters were called to the two-story duplex at 350 Avocado St. at 9:40 p.m., said fire Capt. Chris Coates.

The blaze was mostly contained to one of the bedrooms. Firefighters knocked down the flames within 20 minutes and prevented the fire from spreading to other units, Coates said.

The residents were displaced as a result of the fire, but no one was injured.

The official cause of the fire is under investigation.

Coates suggested that residents monitor candles closely to help prevent a fire.

“Anytime you have an open flame burning inside your residence, it can be very dangerous,” he said.

hannah.fry@latimes.com

Twitter: @HannahFryTCN