Ghana announced yesterday it had expelled eight nationals as part of an exchange of suspected spies that freed Ghanaian Michael A. Soussoudis from a 20-year prison sentence imposed by a federal judge in Alexandria.

The government of the West African country did not name those it released but said they were freed from detention and stripped of their citizenship.

Most were believed to have been accused of spying for the CIA, and were thought to have been identified as CIA informants by a former clerk for the agency who had become Soussoudis' lover in Africa. The clerk, Sharon Scranage, was sentenced Monday to five years in prison on charges of releasing classified information.

The United States had requested freedom for a number of Ghanaians and their families who had "special interest toward the U.S." in exchange for Soussoudis, a first cousin of Ghana's military leader, Flight Lt. Jerry Rawlings. The swap was unusual because it involved trading nationals from the same country.

The United States originally had sought the release of 14 people, according to an individual familiar with the case.

Soussoudis pleaded no contest to two charges of receiving classified information from Scranage and was given a 20-year sentence, suspended on the condition he leave the United States within 24 hours. According to court records unsealed yesterday, he also was required to forfeit his status as a permanent U.S. resident alien. A government source said Soussoudis left the country Monday night for London.

Details of his plea bargain and his sentence had been placed under seal because of "the sensitive nature of the anticipated exchange," the papers said.

Prosecutors said the hearings at which Soussoudis made his plea agreement were closed under the Classified Information Protection Act, which permits such closures on matters affecting national security.