A man shovels mud from a street after a landslide Thursday in San Antonio de Escazu, near San Jose in Costa Rica. ((Juan Carlos Ulate/Reuters) )

A rain-sodden hillside collapsed on homes in a suburb of Costa Rica's capital of San Jose early Thursday, killing at least 20 people, many as they slept. At least 14 people were missing.

Dozens of rescuers, some using dogs, searched throughout the day for survivors and the missing. But they found only corpses, including the body of a child, said Hector Blanco, a Red Cross spokesman. None of the dead had been identified.

Blanco said Red Cross rescue crews suspended the search Thursday evening because more rain made conditions dangerous. He said they would renew their efforts Friday.

President Laura Chinchilla said at least 20 bodies had been pulled from the debris, including four minors. She declared Friday and Saturday days of national mourning because of the tragedy.

The landslide in the suburb of San Antonio de Escazu followed two days of heavy rains that flooded a river near the town and sent 1,500 people to shelters across Costa Rica.

The government declared the country on red alert, the highest level. Chinchilla said the government has $14 million US available for relief efforts.

The San Antonio area received 16 centimetres of rain in just two hours Wednesday, according to Costa Rica's Meteorological Institute.

Rodrigo Araya — born and raised in San Antonio, about 16 kilometres from San Jose — said he awoke to what sounded like a plane landing.

"You could hear people asking for help but could not see anything," said Araya, 50.

Flory Quintero, who lives nearby, said: "I know 20 families lived there together. Some were very poor and had settled near the banks of the river. When it happened, it sounded like a turbine."

The road was covered with stones and branches swept by the currents, Blanco said. There were piles of boulders three metres high.

Relatives arrived with shovels to help but most were turned away because of the danger of another landslide.

Many roads were flooded or blocked by landslides across Costa Rica, and schools nationwide were closed.

At least 200 homes were underwater in Parrita, a town in the central Pacific region, which received more than 33 centimetres of rain Wednesday. A bridge leading into the town was destroyed.