ISTANBUL, Turkey (CNN) -- At least 31 people were dead after two days of torrential rains triggered flash floods in northwestern Turkey, sweeping cars into the sea and sending gushing water into homes and businesses, authorities said Wednesday.

A Turkish woman awaits rescuers on her balcony following heavy morning rain in Istanbul. more photos »

Twenty-six people were killed in Istanbul province and five in neighboring Tekirdag province, according to Turkish Prime Minister Recep Tayyip Erdogan. Nine people were feared missing, he said.

Among the fatalities in Istanbul were seven female textile workers who were trapped in their minivan, CNN sister network CNN Turk reported.

Witnesses in the city of Istanbul said the flash floods hit at 7:30 a.m. Wednesday, washing through an industrial zone situated in a low-lying valley.

Dozens of cargo trucks flipped or were ripped to pieces, the wreckage attracting crowds who watched the chaotic scene from nearby hilltops. See photos of the devastation »

At a news conference in Istanbul's Disaster Management Center, in front of walls of TVs showing live video feeds from Turkey's largest city, Erdogan expressed condolences to families that lost loved ones during the Muslim holy month of Ramadan. Watch more about the deadly flooding »

He said emergency workers rescued an estimated 1,300 people from the flash floods and pledged billions of Turkish lira for disaster relief in Istanbul and Tekirdag provinces.

He also chided developers who built commercial and residential structures in riverbeds that are vulnerable to flooding.

"Our ancestors had a saying: 'The river's revenge will be heavy,' " Erdogan said. "We should remember what our ancestors said."

In the wake of this week's disaster, the prime minister called for relocating all such settlements from riverbeds and moving them to safer ground.

Several roads in Istanbul city remained closed, including the airport road, CNN Turk said. Rescue missions were in full swing, with military helicopters whirring overhead. Residents were advised not to wander from their homes.

"We never had such rain in all the time I have been here," said Zafer Ercan, deputy mayor of the town of Silivri, an hour west of Istanbul city. View images from iReporters

He said that more than 200 cars were washed into the Sea of Marmara and 800 homes and businesses were flooded in the neighboring town of Selimpasa.

The rain stopped Tuesday evening but resumed early Wednesday. Heavy overnight rain flooded western neighborhoods in Istanbul city.

The amount of rain that has fallen in two days roughly equals what normally falls in six months in the Turkish province, Istanbul Gov. Muammer Guler told the state-run Anatolia News Agency.

CNN's Ivan Watson and Yesim Comert in Istanbul, Turkey, contributed to this report.

All About Turkey • Recep Tayyip Erdogan