Earlier this week, Costa Rica's science, technology and telecommunications minister told lawmakers that China represents a security threat for the emerging digital network, while another senior ministry official labeled its government "totalitarian."

The Chinese embassy in San Jose criticized the remarks in a statement.

"These comments gravely affect the confidence and expectations of Chinese companies to undertake economic-trade activities in Costa Rica and they erode the good energy to develop bilateral relations," the embassy wrote in a statement.

The statement went on to say China deemed the comments "irresponsible and unfounded."

In August, Costa Rican President Rodrigo Chaves approved a decree aiming to regulate 5G mobile network development and banned firms from countries that have not agreed to an international cybercrime convention.

The decree's ban applies to tech companies from China, South Korea, Russia and Brazil, among others.

Chaves issued the directive shortly after Laura Richardson, a senior U.S. military commander, visited Costa Rica, where she questioned growing Chinese investment in Latin American infrastructure development including ports and 5G networks.

(Reporting by Alvaro Murillo; Editing by Cynthia Osterman)