The Sandakan Welfare Department said 24 households comprising 150 villagers were affected.
Twenty six fire fighters in four engines and one utility vehicle led by its Operations Chief Donald SR Gan and his officers Devi Rashedee Ensoi and Callixtus Fedilis rushed to the scene, about a kilometere from the District Fire and Rescue Department upon receiving a distress call at 4.08am.
Villagers were seen running helter skelter on the narrow wooden bridges with their relatives and belongings when it happened at 3.45am.
The fire team managed to bring the fire under control only at 5.16am due to strong winds.
No casualties were reported while the cause and damage are being investigated.
Some of the victims are taking shelter at the nearby mosque while others with relatives. A 32-year-old housewife, Sharifah Marlina Hassim, said she and her husband, Mohd Rafai Bacho, 46, had lived there with their five children, aged between 15 years and eight-months, for more than 10 years.
She said all their belongings, including her children's text books and stationery, were damaged in the fire. However, she was grateful her family was safe.
Elopura Assemblyman Datuk Au Kam Wah during a visit to the site said efforts would be made to resettle them at the Government Housing Scheme at Jalan Datuk Tay which still has several vacant lots.
Based on procedure, villagers in a squatter area, even though they may be citizens, are not allowed to rebuild their houses in the area.
He also reminded the victims to make arrangements to replace their damaged documents, particularly where it concerns their children's schooling.
In terms of welfare, he said, the relevant department will collect data as well as provide cooked food for three days starting Sunday.
He also hoped local leaders would come forward and assist the victims where possible.
Sandakan MP Stephen Wong Tien Fatt and his aides also visited the victims.