At least 17 persons were killed in rain-related incidents after intense showers battered Pune city and parts of the district on Wednesday and Thursday, officials said.
The district administration declared holiday on Friday for schools in the city as well in the tehsils of Haveli, Bhor, Purandar and Baramati.
Around 2,500 people were shifted to safer places in Baramati tehsil after water was released from the Nazare dam on the Karha river near Jejuri, district officials said.
Around 3,000 people were taken to safer places due to the flooding in low-lying areas in Pune city and the district, the police said.
In the morning, various authorities had put the figure of those who were shifted to safer places at about 15,000.
Schools and colleges in many places had declared a holiday on Thursday in view of the downpour which began the day before.
The police said 12 people were killed in either floods or incidents of wall collapse in Pune.
"Five people were killed after a wall collapsed in Tangewale colony in Aranyeshwar area.
"Seven people were killed after being swept away in the floods in Dattawadi, Sinhgad Road and Bharti Vidyapeeth areas in the city limits," said a police official.
Another four people went missing in Sinhgad Road and Bharti Vidyapeeth area, he said.
Elsewhere in the Pune district, five people were killed in Purandar and Haveli tehsils.
"In Khed Shivapur on Mumbai- Bengaluru highway, four people were killed and two are still missing. In Purandar, one person was swept away in floods and another is missing," said an officer attached to the Pune district police.
The Army rescued 300 people, including some stranded on rooftops and in the trees, from Solapur Road area, a defence spokesperson said.
A civic official said that as many as 175 vehicles were washed away in floods.
Maharashtra Chief Minister Devendra Fadnavis expressed grief over the deaths.
'My deepest condolences to the families. We are providing all possible assistance needed. State disaster management officials and control room in continuous touch with Pune collector and Pune Municipal Corporation,' he tweeted.
'2 NDRF teams are deployed in Pune & 2 in Baramati. One more NDRF team is on way to Baramati. State Government is also closely monitoring the dam discharge,' Fadnavis added.
District Collector Naval Kishor Ram said that at least 59 villages in the district were affected by the floods.
"We have communicated the whole situation to the Election Commission (as the model code of conduct is in force for October 21 Assembly polls) and appropriate aid will be provided to the victims soon," he said.
Pune commissioner Saurabh Rao said the city recorded 106 mm of rain on Thursday.
When asked if unauthorized constructions exacerbated the situation, he said action will be taken against such structures.