The fire broke out late at night, meaning many of the girls were asleep and unable to escape as flames engulfed the two-storey building.
“The fire broke out at 11pm on Sunday (1600 GMT). Seventeen girls were killed and two are still missing, with five injured,” Police Colonel Prayad Singsin, Commander of Wiang Pa Pao district in Chiang Rai told AFP.
Two of the injured are in a serious condition, he added.
“The fire is out, but the cause of the blaze is still under investigation,” Prayad said, adding forensic officers were due to arrive on Monday.
A Chiang Rai provincial official confirmed the death toll, adding that the privately-run school is home to girls aged between six and 13 years old, drawn mainly from the deprived local hill tribes.
“There were 38 students inside the dormitory when the fire broke out. Some were not yet asleep so they escaped,” deputy governor of the province Arkom Sukapan told AFP.
“But others were asleep and could not escape resulting in the large number of casualties.”
Photographs on the school’s Facebook page showed firefighters struggling to douse the flames as they engulfed the wooden, two-storey building.
Thai media showed a fire truck spraying water onto the blaze as the upper storey of the school was consumed by flames which tore through the roof of the building.
Rescue workers picked through the debris late Sunday and into Monday morning.
Thailand’s hill tribes mainly live in the remote northern area bordering Laos and Myanmar and are often beyond the reach of state resources, suffering at school as well as in their health and development.
Poverty means some resort to drug smuggling for narcotics gangs across the zone, known as the “Golden Triangle”.
Thailand has poor health and safety standards and accidents are common across the kingdom.
Chiang Rai town and the surrounding hills are popular with foreign tourists for hiking and adventure sports.
Tourists can go on tours to the isolated tribes, although the practice has come under criticism for degrading their unique culture and treating the ethnic groups as “human zoos”.