The Spanish government has announced that it has opened a preliminary inquiry into allegations that the U.S. National Security Agency collected data on 60 million telephone calls in Spain.

U.S. Ambassador to Spain James Costos was summoned Monday by Spanish officials after two newspapers in the country reported on documents leaked by former N.S.A. contractor Edward Snowden. The documents indicated that U.S. spying had taken place in Spain between December of 2012 and early January.

After meeting with government officials, Costos issued a statement, in which he said, “Ultimately, the United States needs to balance the important role that these programs play in protecting our national security and protecting the security of our allies with legitimate privacy concerns.”

Iñigo Méndez de Vigo, a Spanish secretary of state, issued a separate statement in which he called upon Washington to clarify the reach of spying measures, calling them “improper and unacceptable between partners and friendly countries.”

Spain formally announced the inquiry Tuesday. The goal of the government is to establish whether a crime was committed, warning that the climate of mutual trust between the U.S. and Spain could be broken if allegations of spying prove to be true.

The N.S.A. is also accused of conducting illegal spying operations in Brazil, France, Germany and Mexico.