Media playback is unsupported on your device Media caption Thousands have been evacuated after flash floods on New Year's Eve

At least 21 people have died in flooding in the Indonesian capital, Jakarta, after the city had its most intense rainfall for at least 24 years.

The Meteorology, Climatology and Geophysics Agency (BMKG) measured 377mm (14.8 inches) of rainfall in a day at an airport in East Jakarta.

That's the most rain in a single day since at least 1996, when records supplied by the agency began.

"The rain falling on New Year's Eve... is not ordinary rain," said the agency.

The agency said the intensity of the rain was due to several factors, including the monsoon season, as well as a high amount of water vapour in the air.

At least 62,000 people have been evacuated out of the city. Some people spent the night on the roofs of their buildings while awaiting rescue.

Image copyright Antara Foto/Muhammad Iqbal/ via REUTERS Image caption A baby is evacuated by a rescue team in Tangerang, near Jakarta, on 1 January

The heavy rainfall is expected to continue until the weekend.

Elsewhere in East Jakarta, 335mm was recorded, while in Bekasi, further east, 259mm fell.

Rainfall above 150mm per day is considered extreme by the agency.

Maximum rainfall intensity during major Jakarta floods

The intense rain began on New Year's Eve and continued through the night, leading to parts of the city being submerged and landslides on the outskirts.

The victims ranged in age from eight to 82. Some died of hypothermia, while others drowned or were killed by landslides.

One 16-year-old boy was electrocuted by a power line.

The electricity has been switched off in many districts of Jakarta as a precaution, and some railway lines are also shut.

On Twitter, President Joko Widodo blamed delays in flood control infrastructure projects for the severity of the damage.

'I walked two hours with water up to my thighs'

Silvano Hajid, BBC News, Indonesia

I have lived in West Jakarta for seven years. The capital is always prone to floods and no one thought this monsoon season was going to be a big deal.

How wrong everyone was.

I worked on New Year's Day and commuting was a nightmare. All main roads were closed, there was no public transportation - and authorities made no public announcement about it.

I walked for two hours through water up to my thighs. Finally I hitched a lift with a truck to take me to the office.

Usually it takes me 45 minutes to go to the office. This time, it took four hours in total.

I have lost electricity in my apartment, but I am far luckier than others. I met Azizah, who lives 3km from my home.

The 52-year-old told me she could not work, or cook, because the water had already reached her roof.

She had not experienced worse floods in her 22 years living in Jakarta. She is now in a shelter.

The death toll is the worst since 2013, when 47 deaths were reported. In 2007, more than 50 were reported killed.

Floods are common in the city around this time of year. They are one of the reasons Mr Widodo plans to move the capital to East Borneo in the next few years.

Jakarta is one of the fastest-sinking cities in the world and experts say it could be entirely submerged by 2050.