Eight people including four children were killed by electrocution in two separate events after days of heavy rain caused floods in impoverished informal settlements near the South African city of Cape Town, emergency services said on Tuesday.

Four people died in the Driftsands settlement on the eastern outskirts, the Cape Town Disaster Risk Management service said in a statement, as the floods caused problems with electricity connections. Four children were electrocuted and died in the Klipfontein settlement.

Many homes in the poor townships on the outskirts of South Africa's second-biggest city have makeshift electricity connections, where people hook their houses or shacks up to existing power lines themselves. They are illegal and dangerous, but relatively widespread.

A storm front hit the Cape Town area and the larger Western Cape province for three days, causing rivers to burst their banks and flood residential areas and major roads, both in coastal regions and inland. Hundreds have been evacuated.

SOUTH AFRICA FLOODING LEAVES MORE THAN 440 DEAD; TROOPS SENT TO HELP WITH RELIEF EFFORTS

Africa Fox News graphic

Eight people were electrocuted as floods caused death and damage across South Africa's Western Cape.  (Fox News)

CLICK HERE TO GET THE FOX NEWS APP

Outages caused by the weather left more than 80,000 customers across the province without electricity, the national power utility said. That had been reduced to 15,000 by Tuesday as the rain eased.

Local officials said three people died after they were swept away by flood waters in the mainly agricultural region of Overberg, just over 60 miles east of Cape Town. The area is one of South Africa's most important wheat-farming regions and there were fears of major damage to crops and infrastructure from the flooding.

Storms caused by cold fronts are common in the Cape Town region and the Western Cape province. A cold front in June caused around $50 million of damage to the agriculture sector in the Western Cape, according to the provincial government.