Image copyright EPA Image caption Incessant torrential rain triggered widespread flooding in the Indonesian capital with thousands of homes inundated, and people forced to flee their houses.

Jakarta is mopping up after heavy floods inundated thousands of homes and roads this week, forcing many people to evacuate and schools to be shut.

At least one man died and thousands of people were affected, reports say.

Regular bad flooding has become one of the main problems facing the Indonesian capital. It is often seen as symbol of poor infrastructure.

But, coming during Jakarta's election for the governor role - one of the most divisive votes in the country - this year's flood have become even more political.

'Political commodity'

The floods have provided "free ride publicity" for both the candidates and their supporters, said political communication expert Gun Gun Heryanto.

"It is always becoming a political commodity in Jakarta. This also happened in the 2012 gubernatorial election."

Image copyright EPA Image caption A broken television set sits outside a building in a flooded neighborhood in Jakarta.

Basuki Tjahaja Purnama - or Ahok - stepped into the governor role in 2014, when his predecessor - Joko Widodo - became president, so is running for election for the first time.

The first Christian and ethnic Chinese governor of the majority Muslim city in more than 50 years was considered almost certain to win, until he went on trial for insulting Islam late last year.

The first round of voting last week suggested Mr Purnama held a narrow lead, ahead of his conservative Muslim rival Anies Baswedan, but below the 50% margin needed to avoid a run-off vote, which would be held in April. He now needs to win over supporters of the defeated third candidate, Agus Harimurti Yudhoyono, also a Muslim.

Mr Purnama has apologised that the trial meant he couldn't initially fully co-ordinate the flood response. He later promised to focus on preventing such flooding from happening again.

Meanwhile Mr Baswedan, a former education minister, also visited victims and asked his volunteers to focus on helping others.

Image copyright Facebook Image caption A man was diving deep into a black dirty blocked drain to clear it of rubbish.

On social media, something of a blame-game has been playing out. There have been more than 250,000 tweets about the flood (or banjir) on Twitter since Tuesday.

One Twitter user said the flood is proof that Ahok "failed to build proper city infrastructure".

Another said: "If you are smiling over Jakarta's flood and feel happy because it can be used to attack Ahok, you are the true enemy of Jakarta's people!"

One post being shared asked: "What is more dangerous than flood of water because of heavy rainfall for days? It is flood of comments without substance because people don't really read."

'Thank you for your sacrifice'

But while both candidates' supporters were busy pointing fingers at each other, heroic stories are also being shared.

One video that was widely shared online shows a man diving deep into a black dirty blocked drain to clear it of rubbish.

This man, thought to be a member of the local sanitation agency, was praised as a real hero, though the Jakarta Sanitation Agency told the BBC it couldn't confirm the authenticity of the video yet.

"He deserves an award for helping a lot of people, others just comments on social media, but no action," said a Facebook user, Kurniawan Ong. "I don't have a heart to watch it, thank you for your sacrifice," said another user.

Some people have highlighted the health risks, as the man has no breathing apparatus or safety gear.

Image copyright BNPB/BAZNAS Image caption A baby, her mother, and an elderly person were rescued during the flood in Jakarta.

Another story being picked up by the media is that of a volunteer who rescued a baby, her mother, and an elderly person after water reached up to 2m in one area in East Jakarta.

"A mother said there was a baby inside the house. I tried to get in, but the alley was so narrow that the boat couldn't get through. So we left the boat and swim," Taufiq Hidayat told the BBC.

"The current was so strong so we used rope to get in. The baby was crying, but you couldn't hear it from the main road."

And here is another type of hero... for canines trapped in an empty house.

Comic artist Aruga Perbawa shared his flood experience story - which happened on his birthday - on Facebook.

Image copyright Aruga Perbawa

He said he found two dogs "trapped behind the fences, crying, scared and shivering".

"And one of them almost drowned because he's standing on top of an already drowned motorcycle. Luckily I managed to enter the house and rescue them, I can literally hear them crying and feel them shivers," wrote Aruga.

"They're okay now. What a birthday eh?"

Additional reports by Hilman Handoni and Rafki Hidayat in Jakarta.