The quake struck at 3:14 p.m. local time (21:14 GMT), 2 kilometers north of Venecia de San Carlos, a town located 81 kilometers north of the capital San Jose, the agency said.
Though the quake occurred at a depth of 111 kilometers, it was strong enough to alarm some residents in affected areas, with several buildings being evacuated as a precaution.
So far, no injuries have been reported, according to the National Emergency Commission and rescue workers.
More about: Costa-Rica