Costa Rica and surrounding Central American countries were hit by a 7.6 magnitude earthquake on Wednesday.

The quake caused panic destroying homes and blocking highways.

The U.S. Geological Survey said the quake was centered about 38 miles from the town of Liberia. The magnitude initially was estimated at 7.9, but was quickly downgraded. Local residents said it shook for about 30 seconds.

A tsunami warning was issued as well though it was cancelled later. However as a precautionary measure local police supervisor Jose Angel Gomez said about 5,000 people, 80 percent of the population, were evacuated from coastal towns in the Samara district west of the quake's center several hours after the quake struck. He said water was receding from the shore.

One man died of a heart attack caused by fright, said Carlos Miranda, a Red Cross worker in Liberia, but there were no reports of deaths directly caused by the quake.

A preliminary review revealed some structural damage near the epicenter, but no deaths or injuries, said Douglas Salgado, a geographer with Costa Rica's National Commission of Risk Prevention and Emergency Attention.

The review also uncovered a landslide on the main highway that connects the capital of San Jose to the Pacific coast city of Puntarenas, Salgado said. Hotels and other structures suffered cracks in walls and saw items knocked off shelves.

"There's chaos in San Jose because it was a strong earthquake of long duration," Salgado said. "It was pretty strong and caused collective chaos."

The quake was also felt in neighboring Nicaragua, which cancelled schools in some areas, and in Panama.

Rosa Pichardo, 45, who lives in Samara, was walking on the beach with her family when the quake hit.

"When we felt the earthquake, we held onto each other because we kept falling," Pichardo said. "I've never felt anything like this. We just couldn't stay standing. My feet gave out under me. It was terrible, terrible."

In the town of Hojancha a few miles (kilometers) from the epicenter, city official Kenia Campos said the quake knocked down some houses and landslides blocked several roads.

"So far, we don't have victims," she said. "People were really scared ... We have had moderate quakes but anearthquake (this strong) hadn't happened in more than 50 years."

Michelle Landwer, owner of the Belvedere Hotel in Samara, north of the epicenter, said she was having breakfast with about 10 people when the earthquake struck.

"The whole building was moving, I couldn't even walk," Landwer said. "Here in my building there was no real damage. Everything was falling, like glasses and everything."

In the coastal town of Nosara, roughly 20 miles (30 kilometers) southwest of the epicenter, trees shook violently and light posts swayed. Teachers chased primary school students outside as the quake hit. Roads cracked and power lines fell to the ground.

Costa Rican television station Canal 13 reported that numerous homes, schools and a hospital on the peninsula were damaged, and it said the country's congress cancelled a session planned for later in the day.

Wednesday's quake occurred in a seismically active zone where the Pacific tectonic plate is diving beneath Central America.

"All along the Pacific coast of Central America, you can expect fairly big earthquakes," said seismologist Daniel McNamara of the U.S. Geological Survey.

The quake was fairly deep — 25 miles (41 kilometers) below the surface. Deeper events tend to be less damaging than ones closer to the surface, but more widely felt.

"If it was a shallower event, it would be a significantly higher hazard," he said.

The last deadly quake to strike Costa Rica was in 2009, when 40 died in a magnitude-6.1 temblor. The last similar-sized quake to hit the country was in 1991 when 47 people were killed in the Limon-Pandora area.

While there was no immediate evidence of tsunami waves, a regional warning was issued based on the quake's strength.

"We're erring on the side of caution until we know for sure," said Mike Angove, acting director of the tsunami program at the National Oceanic and Atmospheric Administration.

Based on reporting by the Associated Press.

Follow us on twitter.com/foxnewslatinohttp://global.fncstatic.com/static/v/all/img/external-link.png
Like us at facebook.com/foxnewslatino