The United States and Cuba have agreed to re-establish diplomatic relations and open economic and travel ties, marking a historic shift in U.S. policy toward the communist island after a half-century of enmity dating back to the Cold War, American officials said Wednesday.

The announcement came amid a series of sudden confidence-building measures between the longtime foes, including the release of American prisoner Alan Gross, as well as a swap for a U.S. intelligence asset held in Cuba and the freeing of three Cubans jailed in the U.S.

President Barack Obama and Cuban President Raul Castro were to separately address their nations around noon Wednesday. The two leaders spoke by phone for more than 45 minutes Tuesday, the first substantive presidential-level discussion between the U.S. and Cuba since 1961.

Wednesday's announcements followed more than a year of secret talks between U.S. and Cuban officials in Canada and the Vatican. U.S. officials said Pope Francis was personally engaged in the process and sent separate letters to Obama and Castro this summer urging them to restart relations.

Officials spoke on the condition of anonymity because they were not authorized to discuss the matter publicly ahead of Obama's remarks.

Gross, 65, was on an American plane bound for the U.S. Wednesday after being released on humanitarian grounds after more than five years in prison. He was accompanied by his wife, Judy, along with three U.S. lawmakers.

As part of resuming diplomatic relations with Cuba, the U.S. will soon reopen an embassy in the capital of Havana and carry out high-level exchanges and visits between the governments. The U.S. is also easing travel bans to Cuba, including for family visits, official U.S. government business and educational activities. Tourist travel remains banned.

Licensed American travelers to Cuba will now be able to return to the U.S. with $400 in Cuban goods, including tobacco and alcohol products worth less than $100 combined. This means the long-standing ban on importing Cuban cigars is over, although there are still limits.

The U.S. is also increasing the amount of money Americans can send to Cubans from $500 to $2,000 per quarter, or every three months. Early in his presidency, Obama allowed unlimited family visits by Cuban-Americans and removed a $1,200 annual cap on remittances. Secretary of State John Kerry is also launching a review of Cuba's designation as a state sponsor of terror.

Obama does not have the authority to fully lift the long-standing U.S. economic embargo on Cuba, given that Congress enacted that policy. However, officials said he would welcome lawmakers taking that step.

There remains a divide on Capitol Hill over U.S. policy toward Cuba. While some lawmakers say the embargo is outdated, others say it's necessary as long as Cuba refuses to reform its political system and improve its human rights record.

Sen. Marco Rubio, R-Florida, said the policy Obama was to announce Wednesday did nothing to address those issues.

"But it potentially goes a long way in providing the economic lift that the Castro regime needs to become permanent fixtures in Cuba for generations to come," Rubio said.

U.S. officials said Cuba was taking some steps as part of the agreement to address its human rights issues, including freeing 53 political prisoners.

Cuba was also releasing a non-American U.S. intelligence `asset' along with Gross. Officials said the spy had been held for nearly 20 years and was responsible for some of the most important counterintelligence prosecutions that the United States has pursed in recent decades. That includes convicted Cuban spies Ana Belen Montes, Walter Kendall Myers and Gwendolyn Myers and a group known as the Cuban Five.

The three Cubans released in exchange for the spy are part of the 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.

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.

Bonnie Rubinstein, Gross' sister, heard the news from a cousin, who saw it on television.

"We're like screaming and jumping up and down," she said in a brief telephone interview from her home in Texas.

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.

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.

Gross' family has said he was in ailing health. His wife, Judy, said in a statement earlier this month that Gross has lost more than 100 pounds, can barely walk due to chronic pain, and has lost five teeth and much of the sight in his right eye. He has begun refusing to see his wife and daughter, the new chief of the U.S. Interests Section in Havana and members of Cuba's small Jewish community, who had been visiting him on religious holidays.

Obama 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.

Associated Press writers Jessica Gresko, Jack Gillum and Ken Dilanian contributed to this report.

Follow Julie Pace on Twitter: @jpaceDC and Matthew Lee: @APDiploWriter