A powerful earthquake struck Costa Rica's Pacific coast on Tuesday, swaying buildings and sending people running into the streets in the nation's capital of San Jose.

The 6.5-magnitude quake was centred in the Guanacaste region of the Central American country, only eight kilometres from the popular tourist town of Nicoya, according to the U.S. Geological Survey. It had a depth of 39.5 kilometres, according to a preliminary report.

At the beach of Matapalo, an hour drive from Nicoya, residents say they heard the quake more than felt it.

"I'm shaken. But it doesn't feel close to how it sounds like. The sound was deafening," said Alberto Canales, a receptionist at the Hotel Riu Guanacaste.

There were no immediate reports of major damage or casualties, however, from the 6.5 quake, which was followed by a magnitude-4.5 aftershock. The original quake was felt in San Jose.

'Very good likelihood' quake is aftershock

The region suffered an even more powerful earthquake last month, when a 7.6 earthquake rattled the same coasts, causing panic, evacuations but minor damage.

Seismologists both in the U.S. and Costa Rica said the quake is probably an aftershock of the Sept. 5 major earthquake.

"It is a very good likelihood that we are looking at an aftershock," said USGS geophysicist Rafael Abreu.

Vanessa Rosales, president of Costa Rica's National Commission for Emergencies, said no one has reported serious damage from Tuesday's quake.

The nation's Red Cross officials also said no damages had been reported yet.

Rosales said that on Wednesday they will have a more complete picture of what the quake did.