"We declare a national emergency before the arrival of Hurricane #Otto," Costa Rica's president wrote on Twitter.
A red alert has been issued for most of the country's coastal areas. The president advised against the use of personal vehicles in the red alert areas starting from Thursday.
"These days and during the weekend the families must remain in their homes to protect themselves from the impacts of hurricane #Otto," Luis Guillermo Solis advised in a Tweet.
Government workers will have Thursday and Friday off from work, according to the president, who also called on the private sector to ensure the safety of workers.
Otto is expected to make landfall on the coast of Nicaragua on Thursday morning. The country has started a mass evacuation of people in the most vulnerable areas.