Jimmy Carter left Cuba on Wednesday without an imprisoned U.S. contractor for whom many hoped the former president would be able to secure a release.

The 39th president was on a three-day visit to the communist island nation, where he met with Fidel and Raul Castro in an effort to mend ties with their government. He also met with dissidents and opposition members.

But The Associated Press reported that Carter did not return to the U.S. with Alan Gross, a subcontractor for USAID who was sentenced to 15 years in prison for illegally bringing computer equipment to Cuba as part of a pro-democracy program. 

Carter said he knew the Cuban government would not release Gross before he left the country.

"The Cuban officials made it very clear to me before I left my home that the freedom of Alan Gross would not be granted," he said, according to the AP.

Hopes escalated that Carter could get the Cubans to free Gross since he traveled to North Korea, another country unfriendly toward the U.S., in August to help free an American citizen jailed there for crossing into the country from China.