Safety concerns have been raised time and again following a series of fire incidents at such private religious schools.
Firefighters rushed to the scene and the fire was out within an hour but it wreaked awful devastation.
Firefighters and witnesses described scenes of horror - first of boys screaming for help behind barred windows as neighbors watched helplessly, and later of burned bodies huddled in corners of the room. Seven people were taken to a nearby hospital to treat their injuries and another 11 were rescued.
The fire broke out near an entrance on the second floor and the pupils were unable to escape through the windows. This incident is being termed as one of the country's worst fire disasters for years.More news: David Johnson to undergo wrist surgery, be placed on IR
The tahfiz school that caught fire and caused 23 deaths this morning was due to move to a new location at the end of the month, said its principal. "Just when you think they're going to stop unloading the van, more brought out", Sumisha Naidu, a correspondent for Channel News Asia, said in a Twitter post.
Khirudin said the Department believed there were other elements outside the building that caused the fire, adding that a thorough investigation was ongoing.
He said 23 students and two adult wardens were killed - either trapped by the fire or dying from smoke inhalation.
The fire broke out at around 5.40 a.m.in a top-floor dormitory in the three-storey building, firemen said, where most of the students were sleeping in bunk beds, with numerous windows covered by metal grills.More news: Eden Hazard needs time, warns Chelsea boss Antonio Conte
The official had earlier said 25 bodies were found, but the more recent tally of dead and injured matches the number of people thought to have resided there.
"If they would have called us for inspection, we would have advised the school to implement all the fire safety requirements before starting its operations", he said.
"The religious school did not have an operating licence from the local authorities", he said.
"It really does not make sense for so many to die", he added.More news: Red Cross in East preparing for Ga., Fla. evacuees from Irma