HAVANA (Reuters) – Cuba’s President Miguel Diaz-Canel said more than 90 percent of the Cuban doctors who had been providing medical care in Brazil have returned home after his government ended a cooperation deal following a diplomatic row.

Cuba’s communist government pulled out of the program last month after far-right President-elect Jair Bolsonaro questioned the Cuban doctors’ qualifications and said they were being used as “slave labor” because their country took 75 percent of their salaries.

Cuba has a respected health service which is the country’s most important hard currency earner. The service sends more than 50,000 health workers to more than 60 countries. The doctors made good money by Cuban standards, even though they only got to keep 25 percent.

Of the 8,471 doctors who had been working mainly in poor and remote areas of Brazil where Brazilian doctors do not want to work, 7,635 had returned home, Diaz-Canel said on Thursday in a ceremony paying homage to them. His comments were published in state-run media on Friday.

Cuba has welcomed the doctors home as heroes at a time when it is bracing for greater regional hostility from a resurgence of the right and turmoil in some of its allies.

“You are a symbol of the country that formed you and are examples of the kind of men and women we aspire to be in Cuban society, based on justice and humanism,” Diaz-Canel was cited as saying by Communist Party newspaper Granma on Friday.

Bolsonaro, who takes office on Jan. 1, has positioned himself as a fervent anti-communist and plans to align Brazil more closely with the United States. On Tuesday, he said that he would take all action “within the rule of law and democracy” to oppose the governments of Venezuela and Cuba.

Brazil has failed to replace nearly one third of the thousands of Cuban doctors who exited the country after the diplomatic spat, as many new recruits failed to turn up for work, its Health Ministry said on Wednesday.

“Not everyone is willing to take on this noble office in the worst conditions,” Cuba’s president said.

Diaz-Canel, 58, who took office from Raul Castro in April, also noted that Cuba had educated 35,613 doctors from 138 countries in its free education system out of a mission of internationalist solidarity.

(Reporting by Sarah Marsh; Editing by Phil Berlowitz)