Alan Gross has called himself a "trusting fool" for going to Cuba in the first place. But family and friends described him with other words: gregarious, outgoing, and a wiz at picking up and playing any musical instrument.

Gross, 65, was freed from prison Wednesday as part of an agreement that included the release of three Cubans jailed in the United States, officials said. Gross was arrested in Cuba in 2009 while working in the Communist-run country to set up Internet access for the island's small Jewish community, access that bypassed local restrictions and monitoring.

At the time, Gross was working as a subcontractor for the U.S. government's U.S. Agency for International Development, which promotes democracy on the island. 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.

During the five years he was imprisoned, family said Gross never grew angry at the Cuban people. He watched Cuban baseball and even jammed with his jailors on a stringed instrument they gave him. He kept in touch with family through weekly phone calls.

But prison was tough on Gross. While in Cuban custody, Gross lost more than 100 pounds, developed problems with his hips and lost most of the vision in his right eye. In April 2014, after an Associated Press story revealed that USAID secretly created a "Cuban Twitter" communications network to stir unrest on the island shortly after Gross was arrested, he went on a hunger strike for more than a week.

His mother, who was in her 90s, persuaded him to start eating again. But she died in June 2014, and despite pleas from his family, Gross was not allowed to return to the United States for her funeral. That, his wife has said, broke him.

Alan Gross was born in Maryland in 1949 and has two daughters with his wife, Judy. The release of Gross, who is Jewish, coincided with the start of Hanukkah.

A Washington Redskins football fan, Gross developed an appreciation for Cuban baseball in prison. In 2012, when Gross had been in prison nearly 1,000 days, his older sister, Bonnie Rubenstein, said that he dreamed of eating ribs and drinking Scotch when he got out of prison. His brother-in-law, Rubenstein's husband, even purchased a 12-year-old single-malt Scotch he planned to save until his brother-in-law got home.

Follow Jessica Gresko at http://twitter.com/jessicagresko