Media playback is unsupported on your device Media caption Oakland residents held a vigil for victims of the fire

Dozens of people are feared dead after a fire broke out during a rave at a converted warehouse in Oakland, California.

Authorities have confirmed nine deaths but say they are preparing for the death toll to rise as high as 40.

Oakland fire chief Teresa Deloche-Reed said between 50 and 100 people were thought to have been inside the venue.

The fire started at 23:30 local time on Friday (07:30 GMT Saturday), police said.

The venue was hosting a concert by electronic group Golden Donna, along with six other acts. The venue had been announced on Facebook earlier in the day.

Videos posted on social media by the fire department showed massive flames burning through the roof of the building.

Image copyright Reuters Image caption Daylight revealed charred walls and window frames

The building did not have a sprinkler system and firefighters did not hear any alarms when they arrived, Ms Deloche-Reed said.

The warehouse, which houses artists in improvised studios, was packed with furniture, mannequins and other objects, obstructing firefighters' efforts to put out the blaze, she added.

"It was filled end to end with furniture, whatnot, collections. It was like a maze almost."

The only exit from the second floor was a staircase made from wooden pallets, Ms Deloche-Reed said.

Image copyright Getty Images Image caption Firefighters struggled to get access to the building overnight

Investigators say they want to find out whether the structure, known as the Oakland Ghost Ship, complied with building regulations.

The city had received complaints about unpermitted construction on the site, and an inquiry launched was still open, said the city's building and planning chief Darin Ranelletti.

He said the city was aware of reports that people were living there, but no permits had been issued for habitation. It was unclear, he added, whether special permits would be needed to use the area as artists' studios.

'I felt my skin peeling'

Specialist rescue teams were called to the site and entered the building after the power had been switched off and a structural engineer had given the go-ahead.

Alameda County Sheriff's sergeant Ray Kelly said there had been no reported injuries and that those in the building appeared to have either made it out unscathed or died.

Image copyright Reuters Image caption The building did not have a sprinkler system

One of the artists who lived in the building, photographer Bob Mule, told the East Bay Times he tried but failed to help a friend get out.

"I literally felt my skin peeling and my lungs being suffocated by smoke," he said. "I couldn't get the fire extinguisher to work."

The fire has been described as the deadliest tragedy in Oakland since the 1989 Loma Prieta earthquake in northern California, which killed 63 people.

The deadliest nightclub fire in recent US history occurred in 2003, when pyrotechnic effects by the rock band Great White set fire to The Station nightclub in Rhode Island, killing about 100 people.