There was no immediate confirmation from either country but, asked about the case, Spain's Defence Minister Margarita Robles played down any impact on relations. She acknowledged a judicial inquiry was underway into "irregular conduct" at the CNI intelligence agency.

"Spain and the United States are friends, allies and partners," she told reporters. "When there are issues that may affect us, they are discussed and dealt with, but in no way does that influence the relations we have."

A U.S. official in Spain said U.S. Ambassador Julissa Reynoso would not comment.

The embassy personnel, whom El Pais did not identify by name or post, were quietly withdrawn at Madrid's request after an investigation showed that two Spanish intelligence officers gave information for "a large sum".

El Pais called the recruiting of secret agents from a host nation to betray their own country "an openly hostile act done with enemy governments, but never with friends or allies".

More than two U.S. "spies" may have been involved, the newspaper said, citing unidentified government sources.

The CNI officers, a chief of area and his assistant, were arrested two months ago and a court ordered their case to be kept secret, El Pais said.

The Spanish government has said an investigation had been opened at CNI's request but would not elaborate as the probe was under secrecy.

Ambassador Reynoso was summoned by Spanish authorities and said she knew nothing about the case and apologised, El Pais added.

Washington then complied with a request from Spain's defence and foreign ministries for the two U.S. staff to leave.

Spokespeople at the Spanish Foreign Ministry and the top court declined to comment, while the CNI did not respond to requests for comment.

(Reporting by Inti Landauro and Jakub Olesiuk; Editing by Andrei Khalip, Andrew Cawthorne and Angus MacSwan)