Costa Rican President Luis Guillermo Solís has announced a state of emergency ahead of the arrival of hurricane Otto that threatens its Caribbean coast and northern towns in Central America. Thousands of people have been evacuated so far.

The hurricane, which was upgraded from a tropical storm, is expected to reach southern Nicaragua or northern Costa Rica on Wednesday night local time and could bring with it winds of up to 120km/hr (75 miles). These areas could see 15cm to 30cm rainfall and could go as high as 50cm in some areas, the US National Hurricane Centre (NHC) said.

"These rains will likely result in life-threatening flash floods and mud slides," with dangerous surf and rip currents conditions on Panama, Nicaragua and Costa Rica coasts, NHC said.

In the Nicaraguan city of Bluefields, at least 45,000 residents were said to be directly in the path of the storm. There was panic buying of battery powered lamps, bottled water, canned food and plastic bags.

A shopkeeper from the city was quoted by AFP as saying "I'm expecting it won't hit Bluefields directly... but it's worrying that it's stationary because it's growing bigger and taking up a lot of water and has become unpredictable — it could go in any direction."

Hurricane Otto
Evacuated people register themselves at the Hostel of the Church Upper Room, in Guapiles, Costa Rica, some 100km from Limon, on 23 November 2016 EZEQUIEL BECERRA/AFP/Getty Images

The National Emergency Commission of Costa Rica said that it was evacuating around 4,000 people from the area and was expected to carry it out by air, water and land in the low-lying coastal areas. President Solis said that the hurricane could damage coffee and agriculture sectors of the country. In Nicaragua too damage of coffee crops, almost ready for harvest, is feared.

Hurricane Otto "could seriously jeopardize food security for small-holder farmers who rely on maize, beans, cocoa, honey, coffee and livestock for their livelihoods," Jennifer Zapata, regional director of Heifer International, a US-based anti-poverty group, said.

Panama's civil defence director, Jose Donderis, said a landslide in the west of Panama city early Tuesday trapped at least nine people. Seven were rescued while two bodies were pulled from the mud. A child was killed in the capital city when a tree fell on a car outside a school.

Officials from Panama later cancelled school and started to release water from lakes and locks feeding the Panama Canal.

President Solís asked for people to keep vehicles off the road and said hospitals in the most vulnerable regions had suspended elective surgeries and were in the process of transferring patients to other areas. He added that all government offices in the country will be closed on Thursday and Friday except the ones dealing with the hurricane.