WASHINGTON - A retired State Department worker and his wife have been arrested on charges of spying for Cuba for three decades, using grocery carts among their array of tools to pass U.S. secrets to the communist government.

An indictment unsealed yesterday said Walter Kendall Myers, 72, worked his way into higher and higher U.S. security clearances while secretly partnering with his wife, Gwendolyn Steingraber Myers, 71, as clandestine agents so valued by Cuba's government that they once had a private four-hour meeting with Fidel Castro.

State Department spokesman Philip Crowley said that the arrest capped a three-year investigation and that Secretary of State Hillary Rodham Clinton had ordered a "comprehensive damage assessment" to determine what Kendall Myers may have passed to the Cubans.

David Kris, assistant attorney general for national security, described the couple's alleged spying as "incredibly serious."

Court documents indicate the couple received little money for their efforts but instead professed a deep love for Cuba, Castro, and the country's system of government.

The documents describe their spying methods changing with the times, beginning with old-fashioned tools of Cold War spying: Morse-code messages over a shortwave radio and notes taken on water-soluble paper. By the time they retired from the work in 2007, they were reportedly sending encrypted e-mail from Internet cafes.

The criminal complaint says changing technology also persuaded Gwendolyn Myers to abandon what she considered an easy way of passing information, by changing carts in a grocery store. It quoted her as saying, "Now they have cameras, but they didn't then."

Authorities say her comments came during a series of meetings with an undercover FBI agent posing in April as a Cuban spy. The Myerses fell for the ruse, authorities say, sharing with the agent their views of Obama administration officials that had recently taken over responsibility for Latin American policy and accepting a device to encrypt future e-mail.

The couple, who live in an apartment in northwest Washington, were arrested Thursday and pleaded not guilty yesterday in federal court. They were ordered held until a detention hearing Wednesday. Their attorney, Thomas Green, declined to comment.

The two were charged with conspiracy to act as illegal agents of, and to communicate classified information to, the Cuban government. Each is also charged with acting as an illegal agent of the Cuban government and with wire fraud.

The indictment says Kendall Myers disclosed to the State Department that he traveled to Cuba for two weeks in 1978, saying the trip was for personal and academic purposes.

The next year, it says, a Cuban government official visited the couple while they were living in South Dakota and recruited them to be spies.