HAVANA/WASHINGTON (Reuters) - Cuba has given a visa to a senior American diplomat to lead the U.S. embassy in Havana, a U.S. official said, in a sign both nations want to keep open lines of communication despite a sharp deterioration in relations since President Donald Trump took office.

FILE PHOTO: Philip Goldberg, the U.S. envoy who coordinates sanctions on North Korea, talks to journalists after a meeting at the Central Bank office in Kuala Lumpur July 6, 2009. REUTERS/Zainal Abd Halim/File Photo

The diplomat, Philip Goldberg, will take up the post as charge d’affaires within days, the U.S. official said. He will head a mission that Washington stripped of many staff four months ago amid a dispute over mystery illnesses among its diplomats on the Communist-run island.

He is likely to spend about six months in the position though the length of his stint is not certain, said the U.S. official, who spoke on condition of anonymity.

Goldberg would be the highest ranking U.S. foreign service officer to serve as charge d’affaires in Havana, said the U.S. official. The fact that Washington selected a diplomat of his rank - one of the senior-most serving career U.S. diplomats - and that Havana accepted him when it could have stalled or rejected him suggests a desire on both sides to maintain links.

The U.S. State Department declined comment. The Cuban foreign ministry did not immediately respond to a request for comment.

Goldberg, whose selection for the job was first reported in December, has previously served as ambassador in the Philippines, chief of the U.S. mission in Kosovo and assistant secretary of state for intelligence and research.

He was expelled as ambassador from Cuba’s socialist ally Bolivia in 2008 for what President Evo Morales said was fomenting social unrest, charges that the State Department described at the time as “baseless.”

U.S.-Cuban relations have deteriorated since Trump took office in January last year and reversed elements of a detente pursued by Democratic former President Barack Obama’s administration. Trump, a Republican, has tightened U.S. trade and travel restrictions on the island and reverted to characterizations of the Cuban government that echo the countries’ long Cold War-era hostility. [L1N1NE0XE]

Ties have also been severely strained by a series of unexplained illnesses that the United States says have struck 24 U.S. personnel and family members stationed in Cuba since late 2016.

The United States cut its diplomatic presence in Cuba by more than half on Sept. 29 and warned U.S. citizens not to visit because of alleged attacks it says have caused hearing loss, dizziness and fatigue in U.S. embassy personnel.

Washington also expelled 17 Cuban diplomats from the United States.

U.S. investigators are looking at a range of theories, including the possibility of a “viral” attack, to explain what may have sickened the Americans, the State Department said on Jan. 9.

U.S. officials have said it was incomprehensible Cuba’s government would not have been aware of what happened or who was responsible, though they stopped short of directly blaming Havana.

Cuban officials are investigating the case, but have denied any involvement or any knowledge of what was behind it.

The U.S. government has not had an ambassador to Cuba since 1960. Washington severed diplomatic ties with Cuba in January 1961 after the 1959 Cuban Revolution. In 1977, it set up a U.S. interests section in Havana under the protection of Switzerland.

As part of the detente between Obama and Cuban President Raul Castro, the United States and Cuba restored diplomatic relations in 2015, elevating their interests sections to embassies. The U.S. embassy has since been led by a charge d’affaires, who handles diplomacy in a foreign country when there is no ambassador.

The Obama administration nominated Jeffrey DeLaurentis, a career diplomat with extensive experience in Cuba, to serve as ambassador but he did not get a vote in the U.S. Senate. He stepped down in July 2017 after completing his three-year tour.