By Zachary Fagenson

MIAMI (Reuters) - A Cuban intelligence agent jailed for more than 15 years for spying on Cuban-American exiles living in Miami will be deported immediately following his release from an Arizona prison on Thursday, his attorney said.

Fernando Gonzalez, 50, was arrested by the Federal Bureau of Investigation in 1998 along with four other Cuban agents and they were all convicted in 2001 of 26 counts of spying on behalf of Fidel Castro's government.

The case of the "Cuban Five" is widely considered an impediment to improving tense relations between the United States and Cuba, separated by only 90 miles of sea.

"Every step has been taken to remove any procedural delays and Fernando looks forward to returning to his family," Gonzalez's attorney Richard Klugh said in an email.

The group, called La Red Avispa or the Wasp Network, infiltrated Miami-based activist group Brothers to the Rescue and attempted to spy on U.S. military installations, relaying coded messages back to Havana, with little success.

Cuba considers the agents national heroes, arguing they were unjustly convicted and were mainly collecting information on Cuban exile groups suspected of planning guerrilla actions against the island.

Gonzalez, who also goes by the name Ruben Campa, was sentenced to 19 years, which was reduced on appeal in 2008 due to good behavior.

A U.S. immigration official confirmed late last month that Gonzalez would be swiftly "removed from the country" as soon as his sentence ends on Thursday.

Another agent, Rene Gonzalez, was released in 2011 and returned to Cuba after serving more than 13 years in a U.S. prison. He renounced his U.S. citizenship to avoid serving the mandatory three-year parole in Florida.

One of the three remaining agents, Gerardo Hernandez, is serving a double life sentence after being convicted of involvement in shooting down two small U.S. planes off the Cuban coast in 1996.

Four people aboard the planes were killed. The planes were on a mission for Brothers to the Rescue, searching for Cubans trying to cross the Florida Straits in flimsy home-made rafts. Cuba accused the planes of violating Cuban air space.

The two other agents still in jail, Antonio Guerrero and Ramon Labanino, also had their sentences reduced. Guerrero is serving 21 years and 10 months and is due for release in September 2017, while Labanino is serving 30 years and is due for release in October 2024.

The agents' case snarled already hostile U.S.-Cuba relations and gained greater attention after the arrest of U.S. contractor Alan Gross in Havana in 2009. Cuba sentenced Gross to 15 years in jail for his role in a U.S. government effort to set up an underground Internet network on the Caribbean island.

The U.S. has demanded that Gross be freed, while Cuba has hinted it might consider a deal to release him if Washington lets the remaining members of the Cuban Five out of jail in exchange.

The Obama administration has repeatedly said it will not consider an exchange.

(Editing by David Adams; Editing by Ken Wills)