President Obama  hailed “a historic step forward” in the relationship between the United States and Cuba on Wednesday as he formally announced the reopening of embassies in their respective capitals later this month after 54 years.

“This is another demonstration that we do not have to be imprisoned by the past,” Obama said during remarks in the Rose Garden, where he was joined by Vice President Biden.

“A year ago,” Obama added, “it might have seemed impossible that the United States would once again be raising our flag over the embassy in Havana. This is what change looks like.”

The step is the latest in Obama's bid to move U.S.-Cuba relations past the Cold War division that has kept the two countries isolated diplomatically from one another for more than half a century. The president has said the period of isolation has not succeeded in pushing Cuba to significant political reforms, and he has suggested that a thawing of relations would prod the regime of President Raúl Castro to loosen restrictions on free speech and political dissent in exchange for a softening of U.S. economic sanctions.

Obama and Castro exchanged letters formally authorizing the respective embassies to open July 20 in each capital. In his remarks, Obama said Secretary of State John F. Kerry will travel to Havana to raise the American flag at the U.S. Embassy compound. Cuban officials said Foreign Minister Bruno Rodriguez will lead a delegation of "distinguished representatives of Cuban society" for the official ceremony to reopen the embassy in Washington.

"In making this decision, Cuba is encouraged by the reciprocal intention to develop respectful and cooperative relations between our two peoples and governments," Castro wrote, according to an English translation provided by the White House.

The decision to restore relations and re-open embassies is only the first phase, the Castro government said in a statement, "in what will be a long and complicated path toward normalizing bilateral ties," a process that will depend on "addressing a series of issues derived from the policies of the past, which are still in force, and affect the Cuban people and their nation."

Reaction from White House allies was enthusiastic.  In a message on Twitter, former secretary of state Hillary Rodham Clinton wrote: “New US Embassy in Havana helps us engage Cuban people & build on efforts to support positive change. Good step for US & Cuban people.”

But critics of Obama's strategy chided him for rewarding a Castro regime that has employed harsh tactics to repress human rights and political dissent. Sen. Ted Cruz (R-Texas), who is seeking the Republican presidential nomination next year, called it a policy of "unconditional surrender" to Castro and threatened to hold up anyone Obama nominates as U.S. ambassador to Cuba until Obama can "demonstrate that he has made some progress in alleviating the misery of our friends, the people of Cuba."

Former Florida governor Jeb Bush, also a candidate for the GOP presidential nomination, accused the president of attempting to burnish his legacy "with dubious diplomatic achievements and photo-ops."

The more important question, Bush said, is "whether improved relations between Havana and Washington advance the cause of human rights and freedom for the Cuban people.  The ongoing detention of dissidents and continued human rights abuses suggest the administration’s policy is failing this test."

Sen. Robert Menendez (D-N.J.), a Cuban-American, also criticized the president, saying that "the message is democracy and human rights take a back seat to a legacy initiative.” But former Maryland governor Martin O'Malley, who like Clinton is pursuing the Democratic nomination for the White House, praised the move, writing on Twitter: "Democracy creates opportunity."

Kerry, who is in Switzerland for the final round of negotiations with Iran over its nuclear program, would become the first U.S. Secretary of State to visit Cuba since 1945, officials said.

Cuba and the United States, Kerry said during remarks shortly after Obama spoke, will "continue to have sharp differences" over areas such as democracy and human rights. But they have common interests in issues such as counterterrorism, counternarcotics and migration, he added.

In his remarks, Obama alluded to his critics who have denounced the restoration of diplomatic relations between the Obama administration and the Castro regime.

“Yes, there are those who want to turn back the clock and double down on a policy of isolation ... but that has not worked for the past 50 years,” Obama said. “Nobody expects Cuba to transform overnight. But American engagement ... is the best way to advance our interests and support democracy and human rights.”

The president renewed his call on Congress to lift travel and business restrictions in Cuba for American citizens. U.S. officials said having a full-fledged embassy will also allow expanded services for the growing number of Americans visiting Cuba, as well as issuing visas for Cubans to come to the United States. Jeffrey DeLaurentis, a foreign service officer currently on his third tour in Cuba, will become charge d’affaires at the new embassy.

In its statement, the Castro government said that relations between the two countries cannot be considered "normal" until the United States lifts its trade sanctions, gives back the Guantanamo naval base, ceases U.S.-government sponsored radio and television broadcasts directed at the island, ends U.S. government programs aimed at "subversion and internal destabilization," and compensates the Cuban people for "economic and human damages," that have resulted from its policies.

Rather than a return to the relationship the two countries had prior to Fidel Castro's 1959 revolution, Havana said the United States and Cuba would need to start from scratch, building a relationship that has "never existed between our countries, and in particular, after the U.S. military intervention, 117 years ago, in the independence war that Cuba had waged for three decades against Spanish colonialism," a reference to the 1898 Spanish-American War.

The statement reiterated Castro's offer to engage in "respectful dialogue" with the United States on issues of disagreement and areas of potential cooperation.

The United States and Cuba initially announced the plan to reestablish diplomatic relations late last year. The move, which followed more than 18 months of secret negotiations, was made possible by Cuba’s concession to release a detained U.S. aid contractor.

Since then, progress toward a formal reopening of embassies has progressed slowly. In April, Obama met briefly with Castro on the sidelines of the Summit of the Americas in Panama, symbolically ending more than a half century of official estrangement.

“Over time, it is possible for us to turn the page and develop a new relationship between our two countries,” Obama said at the April summit.

After the two shook hands, Castro said he agreed with Obama.

“We are willing to discuss everything, but we need to be patient, very patient,” the Cuban leader said.

Cuban officials visited Washington in May for a fourth round of talks on reestablishing diplomatic relations and opening embassies in their respective capitals. A big point of contention in the talks had been whether U.S. diplomats would be able to move about Cuba without seeking government permission.

Both U.S. and Cuban officials expressed hope after the May meetings that a deal was imminent. White House press secretary Josh Earnest even raised the possibility that Obama would visit Cuba during his remaining time in the White House.

The reopening of the embassy would probably clear one of the final barriers to the president realizing that goal.

The White House must notify Congress 15 days before opening the embassy. After relations were severed in 1961, U.S. officials mothballed the six-story modernist embassy. U.S. officials returned to Havana in 1977 when the two countries opened “Interests Sections” under the auspices of the Swiss government. The American compound currently has about 50 U.S. staffers.

A big break in the initial negotiations with Havana came when Obama shook Castro’s hand at the 2013 memorial service for former South African leader Nelson Mandela.

“That caught the Cubans off guard,” Ben Rhodes, a deputy national security adviser, said in an interview Monday at the Aspen Ideas Festival. “When we saw them next they said, ‘Your president treated us with respect.’ ”

Even after the embassy is reopened, it would take congressional action to end the decades-long economic embargo of the island nation. Republicans controlling Congress have vowed to keep the embargo in place.