The United States and Cuba have reached a deal to reopen embassies and reestablish diplomatic relations for the first time since 1961, said a senior administration official.

President Obama and Secretary of State John F. Kerry, who is in Switzerland for the final round of negotiations with Iran over its nuclear program, are both expected to speak about the historic breakthrough Wednesday morning.

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 accession 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 Cuban President Raúl 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.