Ten people have been killed in a fire that raced through a packed nightclub in Indonesia's second-largest city, including a mother and the baby she apparently gave birth to during the tragedy.

An Australian and a Japanese national also were among the dead, said police spokesman Bahagia Dachi.

Some witnesses told officers a spark from a cigarette triggered Friday's blaze.

The Redboxx Cafe erupted in flames at 3:30am as hundreds of people filled the club in downtown Surabaya, some to watch a World Cup football game.

It took firefighters several hours to bring the blaze under control. Dachi said five victims were in critical condition at local hospital.

A mother who apparently gave birth during the fire and the baby were both found dead, he said. Trauma can sometimes induce labour.

Dachi said the death toll could rise because rescuers were still searching for possible victims under the collapsed roof of the cafe on the second floor.