Horse-drawn carts worked to help rescue flood victims Monday after days of intense rain killed at least 29 people and forced nearly 340,000 residents from their homes in the Indonesian capital of Jakarta.

The victims had died either by drowning or electrocution, confirmed officials.

At least nine million people live in the densely packed city, which is seeing its worst flooding since 2002.

"As of today, 75 per cent of Jakarta remains flooded," Anwar Arafin of Jakarta's flood information centre said Monday.

Floods are common in Jakarta, though not on the scale as seen in recent days.

Incessant rains caused rivers to burst their banks on Friday, swamping more than 20,000 homes, businesses and government buildings and forcing authorities to shut off electricity and water supplies.

The government dispatched medical teams on rubber rafts into the worst-hit districts to prevent outbreaks of disease among residents without clean drinking water.

The Associated Press reports that hundreds of people scrambled to the upper floors of their homes to escape the rising waters. Some became trapped, while others refused to leave despite warnings that the flood waters could rise further in the coming days.

Indonesia's meteorological agency is forecasting two weeks of rain.

Meanwhile, Dr. Rustam Pakaya from the health ministry's crisis center, said nearly 340,000 people had been forced from their homes. Many of the homeless were staying with friends or family or at mosques and government buildings, he said.

"We fear that diarrhea and dysentery may break out, as well as illnesses spread by rats," said Pakaya. "People must be careful not to drink dirty water."

Clearer skies helped the situation in several areas on Monday but most of the city remained submerged under waist-high waters.

"We expect residents to stay alert because water may rise again and very fast,'' said Sihar Simanjuntak, an official monitoring the situation.

Jakarta Governor Sutiyoso blamed deforestation in Puncak, saying it had destroyed water catchment areas, while Environment Minister Racmat Witoelar blamed poor urban planning.

Seasonal downpours cause dozens of landslides and flash floods each year in Indonesia, where millions of people live in mountainous areas or near fertile plains.

With files from The Associated Press