Updated

If he renounces his U.S. citizenship, he can stay in Cuba.

Rene Gonzalez, 56, one of the convicted spies known as the "Cuban Five," will be able to permanently stay in the island after being allowed to visit last month for his father’s funeral. A federal judge ruled Friday that the only condition to him staying is he has to give up his U.S. citizenship.

U.S. officials, who initially opposed him staying, eventually dropped their opposition.

Gonzalez was released from U.S. prison in October 2011 but was still serving three years' probation, which the Justice Department had previously insisted must be completed in the U.S.

This week, however, the Justice Department reversed its position, leading to U.S. District Judge Joan Lenard's ruling accepting Gonzalez's offer to give up U.S. citizenship.

Reached in Havana, Gonzalez told The Associated Press he was thrilled but wanted a chance to review the judge's decision.

"First I have to read the order," he said. "If the order is real, it will be a great relief to me."

It was not clear what effect, if any, the decision would have on the status of Alan Gross, an American contractor jailed in Cuba whom Cuban officials have offered to release in exchange for the liberation of the Cuban Five. The four other members of the Cuban Five are still imprisoned in the U.S.

The U.S. has said the cases are not linked. The Cuban government did not comment immediately.

Gonzalez and the others were convicted in 2001 of being part of a ring known as the "Wasp Network," tasked by Cuba's communist government with spying on U.S. military installations in South Florida, Cuban exile groups and politicians opposed to the government of then-President Fidel Castro.

The men are celebrated as heroes in Cuba, which has portrayed them as agents dedicated to preventing violent attacks against their country by Miami-based militant exile groups.

Still, one member of the group was convicted of murder conspiracy for the 1996 downing by Cuban fighter jets of a plane operated by "Brothers to the Rescue," which dropped pro-democracy leaflets over Cuba and assisted Cuban migrants attempting to reach U.S. shores.

The timing of Gonzalez's citizenship renunciation was not immediately clear. His attorney, Phil Horowitz, said it would occur sometime before May 16 as ordered by Lenard at the U.S. Interests Section in Havana.

"''It is a big deal. It's been a long road," Horowitz said. "Now he's going to be able to rejoin his family on a permanent basis."

Gonzalez, who will remain a Cuban citizen, has a wife and two daughters in Cuba.

The Justice Department explained its turnabout by saying that since Gonzalez was already in Cuba, there was no longer concern that he would use a promise of citizenship renunciation to improperly return to the island. Assistant U.S. Attorney Eduardo Sanchez also noted in a court filing that a person must be on foreign soil to give up U.S. citizenship.

"Given that the defendant is now present in Cuba, the FBI has concluded that the security interests of the United States are furthered if the defendant, while already in Cuba, is allowed to voluntarily renounce his United States citizenship and thereafter does not return to the United States," Sanchez wrote.

Horowitz said Gonzalez, who was previously allowed a temporary visit to Cuba when his brother fell ill, will comply with all the U.S. conditions.

"I can't imagine him traveling to the U.S. or the U.S. allowing him to return," Horowitz said.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino