Tropical Storm Otto headed toward the Pacific Ocean early Friday after dumping rain on Costa Rica and Nicaragua, where it made landfall as the southernmost hurricane on record to hit Central America.

Otto reached Nicaragua's Caribbean coast on Thursday as a dangerous Category 2 storm but it immediately began fading as it crossed land, becoming a tropical storm by nighttime. It was expected to emerge over the eastern Pacific early Friday.

Authorities in Nicaragua said the hurricane had damaged houses, but so far there were no reports of casualties. Earlier, heavy rains from the storm were blamed for three deaths in Panama.

Otto battered Nicaragua's Corn Islands with 3.5-meter waves and damaged houses but residents were all safe in refuges, said the archipelago's mayor, Cleveland Rolando Webster.

"There is a lot of rain, the sea is rough and the wind is strong. We have been in danger all night, getting cold and wet," said Alicia Lampson, 21, as she arrived at a shelter with a group of people from the village of Monkey Point, south of Bluefields, Nicaragua.

The U.S. National Hurricane Center said the unusually strong late-season hurricane hit land in Nicaragua just north of the Costa Rican border. By late Thursday night, it was located about 20 miles (30 kilometers) north of Liberia, Costa Rica.

The Nicaraguan government declared a state of emergency, and said evacuations would continue because of the continued risk of flooding.

In Bluefields — the nearest major town on the Nicaraguan coast — residents rode out the hurricane.

"In our house, we have packed up some things in plastic bags and we went out to buy some provisions, just in case," said resident Jean Hodgson.

Nicaragua closed schools and was evacuating more than 10,000 people from communities in the storm's path. Heavy rains were expected to affect the entire country, raising the possibility of flooding and landslides.

Officials in Costa Rica ordered the evacuation of 4,000 people from its Caribbean coast and called off school nationwide for the rest of the week.

Costa Rican President Luis Guillermo Solis said Otto could damage the country's important coffee and agriculture sectors. Nicaragua also feared damage to coffee crops that are almost ready for harvest.