HAVANA (Reuters) - Cuba said on Wednesday it would pull thousands of its doctors from Brazil after the South American nation’s President-elect Jair Bolsonaro questioned their training and demanded changes to their contracts.

FILE PHOTO: Brazil's President-elect Jair Bolsonaro gestures during a meeting at Superior Labor Court in Brasilia, Brazil November 13, 2018. REUTERS/Adriano Machado /File Photo

The far-right Bolsonaro, who takes office on Jan. 1, said in an interview this month that the 11,420 Cuban doctors working in poor and remote parts of Brazil could only stay if they received 100 percent of their pay and their families could join them.

Under the terms of the agreement with Cuba, brokered via the Pan-American Health Organization, Havana receives the bulk of the doctors’ wages.

Bolsonaro threatened to break off diplomatic relations with Havana over the program, saying it trampled on the rights of the doctors by handing the Cuban government 75 percent of their pay and denying mothers the right to have their children with them.

“That is just torture for a mother,” Bolsonaro said in the Nov. 2 interview with Brasilia’s Correio Braziliense newspaper. He also questioned the qualifications of the Cuban doctors and said they would have to renew their licenses in Brazil.

Cuba’s Health Ministry rejected Bolsonaro’s comments as “contemptuous and threatening” to the presence of our doctors” in a statement announcing its withdrawal from the program.

“These unacceptable conditions make it impossible to maintain the presence of Cuban professionals in the program,” the ministry said in a statement.

Cuban doctors work in dozens of countries, some without cost to their hosts and others where Cuba charges a fee per doctor, most of which it claims goes to keep the free national health system in Cuba functioning.

The billions of dollars in revenues represent the most important source of export earnings for the Communist-run government.

Since the Brazilian program, called “More Doctors,” was started in 2013 by leftist former president Dilma Rousseff, about 20,000 Cuban health professionals have served in Brazil, including in 700 municipal districts that had never had a resident doctor, the ministry said.

Bolsonaro said the program could have continued if it complied with his conditions. “Unfortunately, Cuba did not accept,” he said in Twitter post after the Cuban announcement.