The United States government has expelled two Cuban diplomats after a number of American embassy staff were forced to leave Havana because of mysterious medical symptoms that were first reported last year, the State Department said.

State Department spokeswoman Heather Nauert said the Cuban diplomats were informed of the US government's decision on May 23.

The Associated Press (AP) reported on Wednesday that the American diplomats suffered severe hearing loss attributed to a covert sonic device.

READ MORE: Castro blames Trump for 'setback' in US-Cuba relations

"We first heard of these incidents back in late 2016," Nauert said, without specifying the number of Americans affected by these symptoms or detailing their nature.

"Some US government personnel who were working at our embassy in Havana, Cuba ... reported some incidents which have caused a variety of physical symptoms.

"As a result of that, we've asked two Cubans to leave the United States, and they have."

A separate AP report quoted unnamed US officials as saying some of the diplomats' symptoms were so severe that they were forced to cancel their tours early and return to the US.

"We requested their [Cuban diplomats'] departure as a reciprocal measure since some US personnel's assignments in Havana had to be curtailed due to these incidents," said Nauert.

"Under the Vienna Convention, Cuba has an obligation to take measures to protect diplomats."

After months of investigation, US officials concluded that the diplomats were exposed to an advanced device that operated outside the range of audible sound and was deployed either inside or outside their residences.

It was not immediately clear if the device was a weapon used in a deliberate attack or had some other purpose, AP reported.

Nauert said that investigators did not yet have a definitive explanation for the incidents but stressed that they take them "very seriously", as shown by the Cuban diplomats' expulsions.

Later on Wednesday, the Cuban government confirmed the expulsions, but denied the alleged incidents in Havana.

"Cuba has never, nor would ever, allow the Cuban territory to be used for any kind of action against accredited diplomats or their families," the foreign ministry said in a statement.

It also said it had objected to the expulsion of its officials, while also urging the US to work together to shed light on the incidents.

Relations between the US and Cuba were restored in 2015 after a half-century break by then president Barack Obama and his Cuban counterpart Raul Castro.

But the rapprochement was partially rolled back by Obama's successor Donald Trump who, in June, announced tightened rules for Americans travelling to Cuba, banned ties with a military-run tourism firm and reaffirmed the existing US trade embargo.