Havana – As part of an agreement that also includes the release of three Cubans jailed in the United States,  American Alan Gross has been released from a Cuban prison after five years, senior U.S. officials said Wednesday.

Officials said Gross was on a U.S. government plane bound for the U.S. Wednesday morning after being released on humanitarian grounds by the Cuban government at the request of the Obama administration.

Obama administration officials have considered Gross’ imprisonment an impediment to improving relations with Cuba, but the surprise deal could help clear the way for broader discussions on strengthening ties and perhaps ending the decades-long U.S. economic embargo against its long-time communist foe.

President Barack Obama was to address the nation on Cuba at noon Wednesday, the White House said, and U.S. officials speaking on condition of anonymity said he was expected to announce Gross’ release. They were not authorized to be identified by name before Obama’s remarks.

Gross was detained in December 2009 while working to set up Internet access as a subcontractor for the U.S. government’s U.S. Agency for International Development, which does work promoting democracy in the communist country. It was his fifth trip to Cuba to work with Jewish communities on setting up Internet access that bypassed local censorship.

Cuba considers USAID’s programs illegal attempts by the U.S. to undermine its government, and Gross was tried and sentenced to 15 years in prison.

The three Cubans released in exchange for Gross are part of the so-called Cuban Five — a group of men who were part of the “Wasp Network” sent by Cuba’s then-President Fidel Castro to spy in South Florida. The men, who are hailed as heroes in Cuba, were convicted in 2001 in Miami on charges including conspiracy and failure to register as foreign agents in the U.S.

Two of the Cuban Five were previously released after finishing their sentences.

In a statement marking the fifth anniversary of Gross’ detention earlier this month, Obama hinted that his release could lead to a thaw in relations with Cuba.

“The Cuban Government’s release of Alan on humanitarian grounds would remove an impediment to more constructive relations between the United States and Cuba,” Obama said in a statement.

The president has taken some steps to ease U.S. restrictions on Cuba after Raul Castro took over as president in 2010 from his ailing brother. He has sought to ease travel and financial restrictions on Americans with family in Cuba, but has resisted calls to drop the embargo.

The surprise prisoner swap has echoes of the deal the U.S. cut earlier this year to secure the release of Army Sgt. Bowe Bergdahl, who had been held by the Taliban. In exchange for his release in May, the U.S. turned over five Taliban prisoners held at the Guantanamo Bay detention center.