CARACAS – Thousands of Venezuelans fled their homes on Tuesday after landslides and swollen rivers killed at least 21 people and threatened to cause more damage.

The stormy weather closed most of the OPEC member nation's two largest oil refineries on Monday. A source at state oil company PDVSA said they were slowly restarting on Tuesday.

Millions of poor Venezuelans live in unplanned, hillside shantytowns in Caracas and along the Caribbean coast. Sustained rain conjures up memories of a devastating 1999 landslide that killed at least 10,000 people.

Small mudslides toppled dozens of houses, and crushing cars and blocking roads this week. Most of the 21 died in landslides, while others were swept away by a river. The government has declared an emergency in three states and Caracas, canceling school and opening hundreds of storm shelters.

"The rains will carry on for the next three days at least," Vice President Elias Jaua told state television.

Long lines formed in poor Caracas neighborhoods as officials registered families to be housed in temporary accommodations including hotels, government offices and even the presidential palace.

Vice President Elias Jaua said 5,600 people were forced to leave their homes because of the rains.

Most of the oil-producing state of Falcon was hit by flooding, which caused a small oil spill near the Cardon and Amuay refineries, which have a combined capacity of 955,000 barrels per day.

The main units of Amuay, which can produce 645,000 bpd, restarted on Tuesday, a source at the refinery complex said. Cardon will take up to 10 days to operate normally after a power cut knocked out its industrial services on Monday.

The source, who asked not to be named because he was not authorized to speak, said shipments from the two refineries had not been affected.

The Andean Development Corporation, a regional development bank, said it authorized a $100 million donation to Venezuela to help deal with the disaster.