Monsoon rains have inundated much of Pakistan, leaving large parts of the southern city of Karachi under water and causing at least 17 deaths as of Sunday.

Rescue official Anwar Kazmi said seven people died from electrocution and three people died after a roof collapsed in Karachi.

The downpour and flooding began overnight, with authorities reporting more than 180 millimetres (seven inches) of rain in the port city.

Pakistan Monson
A man carries a child as he wades through a flooded road cased by heavy monsoon rains in Karachi (Fareed Khan/AP)

Police officer Idrees Khosa said five people died in a flash flood and another two were electrocuted in Punjab province, which also had heavy rains.

Pakistan struggles to cope with the yearly monsoon, which runs from July to September and causes flooding across South Asia.