At least 25 people have been killed and almost 340,000 forced from their homes in the Indonesian capital of Jakarta as rivers burst their banks following days of rain.

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.

Days of 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. Since then, the rain hasn't let up.

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

AP 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."

There was little rainfall over Jakarta on Sunday, but downpours over the southern hills caused rivers to swell across the city, prompting authorities to open flood gates.

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