WASHINGTON (Reuters) - A former U.S. State Department official and his wife have been arrested for spying for the Cuban government for nearly 30 years, the Justice Department said on Friday.

A news TV cameraman films outside the residence of accused spies Walter and Gwendolyn Myers in Washington, June 5, 2009. REUTERS/Jason Reed

Walter Kendall Myers, 72, aided by his wife Gwendolyn Myers, 71, used his Top Secret security clearance to pass on classified information to the Cuban government and at one point met with Cuban leader Fidel Castro, according to court documents.

The two were charged with conspiracy to act as illegal agents of the Cuban government and to communicate classified information to Cuba, the Justice Department said. They were also charged with wire fraud and acting as illegal agents.

They face up to 35 years in prison. The two pleaded not guilty and will be held until a detention hearing on Wednesday, a Justice Department official said.

A lawyer representing the couple declined to comment.

The arrests come as the United States and Cuba have offered glimmers of hope that they might be ready to end years of hostility. In mid-April, President Barack Obama pledged a “new beginning” with Cuba after modestly easing the 47-year-old U.S. trade embargo against Havana.

The Cuban government had no immediate reaction.

According to court documents, the two were recruited in 1979 by a Cuban official who directed Kendall Myers to pursue a job at either the State Department or the CIA.

Myers worked part-time at the State Department since 1977 and joined full-time in 1985, eventually working his way up to a position of senior analyst specializing in intelligence analysis on European matters.

With a Top Secret/SCI security clearance, he had daily access to classified information and viewed more than 200 intelligence reports about Cuba, according to the affidavit.

He retired in 2007.

Gwendolyn Myers worked at a bank. The two received messages from the Cuban government via shortwave radio and hand-passed messages, and typically passed their responses to handlers by hand.

Gwendolyn Myers said her favorite way to pass information was by swapping carts at a grocery story, according to the affidavit filed by an FBI agent.

A Justice Department official said they were motivated by a desire to help the Cuban government, not money. They traveled occasionally to Cuba and other locations across Latin America to meet with their handlers, and met Castro in 1995.

Kendall Myers told an undercover FBI source posing as a Cuban intelligence officer he had received “lots of medals” from the Cuban government. The undercover operation began in April.

In meetings with the FBI source, who at one point offered Kendall Myers a cigar, the couple allegedly agreed to provide information on the April 17-19, 2009 Summit of the Americas in Trinidad and Tobago, according to court documents.

Secretary of State Hillary Clinton has ordered a damage assessment and a review of the department’s security procedures, the State Department said.