Indonesian firefighters on Wednesday rescued a 5-year-old boy who had been trapped under the debris of his house for some 45 hours after a deadly earthquake hit Java Island.

The death toll from Monday's magnitude 5.6 quake, meanwhile, rose to 271, with 151 others missing and some 2,000 injured, as search operations continued.

"Azka was rescued at around 10:40 a.m. by a team of firefighters," Anissa Novrianti, spokeswoman of the National Search and Rescue Agency, said, referring to the boy by his name.

Screen grab from a video shows a five-year old boy named Azak being held by his father in Cianjur, Indonesia on Nov. 23, 2022. Azak was rescued by firefighters after being trapped under the debris of his house for some 45 hours after a deadly earthquake hit the area. (Photo courtesy of National Search and Rescue Agency)(Kyodo)

Video footage shared by a volunteer and the agency showed Azka being lifted from the debris of his two-story house in the Kampong Rawa Cina area of Cianjur by the rescuers.

He was immediately comforted by his father and rushed to the hospital. His mother was found dead Tuesday.

"He looked terrified and could only cry after the team lifted him out," Anissa told Kyodo News.

The boy's grandmother was found dead, lying next to him, according to the National Disaster Mitigation Agency.

The quake struck Sukabumi Regency in West Java Province but also severely affected neighboring Cianjur Regency. The regencies are home to around 5.2 million people.

Photo taken in the district of Cugenang in Cianjur, Indonesia, on Nov. 23, 2022, shows a house destroyed by an earthquake that struck the area two days earlier. (Kyodo)

Alyssa Cahyadi, 7, said he was studying in his classroom at an Islamic religious school, or madrassa, in Cugenang District, one of the worst-affected areas of Cianjur, and his teacher was about to write on the blackboard when the room began shaking.

"Out now!" the first-grader said in recalling his teacher's instructions to his students to evacuate the building.

At the madrassa, school bags, shoes and sandals were seen scattered about classrooms, abandoned by students who escaped the disaster, though some were slightly injured by falling bricks.

The quake also damaged more than 56,000 houses -- over half of them seriously -- and displaced over 62,000 people.

Currently staying in tents, many of them are running low on food due to problems in accessing the affected areas, according to National Disaster Mitigation Agency.

Some vehicles carrying assistance have been stuck in traffic jams for hours because they have to pass through narrow streets and alleys to reach badly hit areas after landslides blocked the main road.

Hungry residents stopped vehicles carrying relief supplies, asking for food.

On Tuesday, President Joko Widodo instructed his ministers to prioritize evacuations and rescue of survivors buried under rubble by quickly restoring access to areas isolated by landslides.

Indonesia, with a population of over 270 million, is one of the most active seismic regions in the world, sitting on the Pacific Ring of Fire, where many earthquakes and volcanic eruptions occur.

Related coverage:

Indonesia quake death toll rises to over 250, 151 others missing