The doctors and nurses began boarding planes late last year, Cuban professionals who had come to aid Ecuador’s health-care system, their time cut short by a government that no longer wanted them.

Ecuador is one of a handful of U.S. allies that fell in step with the Trump administration’s zero-tolerance policy on Cuba, bringing an end to agreements that filled understaffed clinics and hospitals from the snow-capped Andes to the sweltering Amazon with thousands of doctors and nurses trained by the communist state.

Now that country, and South American neighbors Brazil and Bolivia, are struggling to cope with outbreaks of the coronavirus that have overwhelmed hospitals and, in Ecuador, left bodies in the streets. The surge in cases and deaths, expected to climb in the coming weeks, has partisans arguing over a highly politicized question: Could those doctors and nurses now be saving lives?

“When they left, there were no specialists to replace them,” said Ricardo Ramírez, a retired physician in Ecuador’s hard-hit city of Guayaquil and head of a regional Anti-Corruption Commission. “It’s one important factor why we can’t provide an adequate response to the virus now.”

As the virus ravages countries around the world, Cuba’s Cold War-era medical brigades, long the island’s widest-reaching and most influential diplomatic tool, are having a resurgent moment. Since the pandemic began, Havana has reached deals to deploy emergency crews to 17 nations, from Italy to Andorra to Mexico and Haiti.

The renaissance of Cuba’s “doctor diplomacy” is prompting stark warnings from a Trump administration that has put the Obama-era thaw with Havana in full reverse. Countries that contract Cuban doctors, U.S. officials say, are enabling an abusive labor program designed to enrich an authoritarian state.

“Cuba’s deployment of medical missions overseas, while cloaked in altruism, is actually a scheme to generate income that exploits Cuban medical workers,” the State Department said in a statement to The Washington Post. “Cuba’s medical missions program is not inherently humanitarian; the regime earns income by retaining up to 90 percent of the doctors’ salaries.”

But as the deadly coronavirus spreads, an emergency requiring all hands on deck, more countries are seeing Cuban doctors as part of the solution. Their departure from some South American countries, critics say, has left gaps in frayed public health systems that have grown dangerously wider during the pandemic.

In Bolivia, hundreds of Cuban doctors left soon after right-wing senate Vice President Jeanine Anez replaced longtime socialist President Evo Morales in November and ties between La Paz and Havana rapidly melted down.

“If the Cuban medical brigade were still in Bolivia, there would be better management of coronavirus,” said María Bolivia Rothe, a health official under Morales.

“Why?” she asked. “Because the Cuban doctors always went where no one else would.”

Doctors are ‘heroic,’ but Washington says they’re exploited

Since the 1960s, Cuba’s medical brigades have been the public face of a health system heralded by socialist governments as the gold standard for developing nations but which fell on harder times after the fall of the Berlin Wall.

Today the program keeps more than 28,000 Cuban medical staff in 60 countries, a major source of income for a communist state squeezed by the decades-long U.S. embargo. Brigades aided Indonesia after the 2004 tsunami and Haiti after the devastating 2010 earthquake and subsequent cholera outbreak. Teams were dispatched to Liberia, Guinea and Sierra Leona to fight Ebola in 2014.

But the program has also been plagued by charges of abuse.

Cuban officials say they tailor deals with each client country. Poorer nations, they say, pay only the medical teams’ expenses; wealthier countries pay more. Critics say Cuban doctors dispatched abroad are allowed to keep only a small portion of their earnings and operate under oppressive conditions.

“What these doctors are doing is heroic,” said José Miguel Vivanco, Americas director at Human Rights Watch. “But how the Cuban [government] treats them is disgraceful, taking credit for their good deeds while pocketing most of their earnings, denying them basic freedoms of speech and movement, and keeping them and their families back in Cuba in a situation of perpetual duress.”

José Ramón Pérez, 49, a former physician in the program, said he worked in Venezuela, Guatemala and Bolivia before defecting in 2012. While he was working in Bolivia, he said, he was told by Cuban officials to falsify records to make it seem as if he were treating more patients than he was.

Pérez said he received $300 a month. Meager pay by Western standards, it was several times more than state salaries for doctors working inside Cuba — and his primary motivation, he said, for accepting the assignments. He estimates the Cuban government received more than 10 times that for his services.

In Bolivia, Pérez said, Cuban officials took his passport to prevent unauthorized travel. “As soon as I got to the airport in December 2011, I had to give it to one of the heads of the mission,” he said. “That’s how they control you.”

Cuban officials would not disclose the specifics of their medical contracts but dismissed allegations of abuse.

“It is a well calculated propaganda label conceived by the U.S. government to discredit what is an indisputable moral accomplishment of a developing country,” Fernández de Cossío, director general of the Cuban Foreign Ministry for U.S. affairs, said in a statement to The Post. “It is no secret that it is the policy of the U.S. to discredit Cuba and to not tolerate any notion of recognition to our country.”

‘If the U.S. could have offered it, we would have taken it’

Ecuador called on Cuba for medical assistance during a dengue epidemic in 2001 and in the aftermath of a 2016 earthquake. Formal deals were struck between 2013 and 2015, as then-President Rafael Correa, an anti-U. S. leftist, built closer ties with Havana.

By 2015, there were 800 to 1,000 Cuban specialists in the country, according to Carina Vance Mafla, health minister under Correa. Some worked in major cities such as Quito, the capital, and Guayaquil. But more were stationed in far-flung rural areas, where “it is almost impossible to fill positions,” Vance Mafla said. (Correa, tried in absentia this week by an Ecuadoran court, was found guilty of corruption.)

Lenín Moreno, who succeeded Correa in 2017, was a fast friend of the Trump administration. Last November, as Ecuador was seeking U.S. backing for a bailout from the International Monetary Fund, it canceled its contracts for Cuban doctors.

Moreno’s government said the move would open more jobs for Ecuadorans. Yet interviews with eight doctors in different regions of Ecuador suggest many of the positions vacated by the Cubans were never filled.

In tropical Guayaquil, Ecuador’s largest city and the epicenter of its outbreak, the coronavirus has overwhelmed hospitals and left bodies rotting for days in homes and on the streets. Ecuadoran officials announced they would recruit 700 new health-care workers — a number critics argue could have been filled by the dismissed Cuban medical staff.

“Not only has it hampered their ability to deal with the horrible situation we’re going through in Ecuador right now, but the fact that they have not reached out to Cuba for help is also, in my opinion, a terrible mistake,” Vance Mafla said.

Others say the deals cut for Cuban doctors and nurses amounted to political bargains between leftists. The doctors weren’t trained to international standards, they argue, and would be of little help now — particularly, they say, given that the bigger problem in the pandemic is the shortage of medical supplies, not staff.

“The Cubans were never necessary,” said Santiago Carrasco, president of the Medical Federation of Ecuador. “They weren’t even specialists.”

Yet countries taking new brigades to fight the coronavirus now are calling them indispensable. A team of 31 Cuban doctors and nurses recently arrived in Antigua and Barbuda to form the “core” of the Caribbean nation’s emergency response, Prime Minister Gaston Browne said.

“Many of our local nurses are fearful to treat covid-19 because it’s so infectious; they don’t have that kind of experience,” Brown told The Post. “Because they have been in the front lines in West Africa fighting Ebola, the Cuban doctors have greater competence, for sure.”

Antigua and Barbuda has welcomed brigades for years. Cuba has also trained some of the country’s homegrown medical staff.

“The point is that we needed assistance to deal with this life-threatening virus, and that the help that was available to us came from Cuba,” Brown said. “If the U.S. could have offered it, we would have taken it. We are a small developing country. What are our options?”

Brazil, Latin America’s largest nation, hosted 8,500 Cuban doctors under the leftist President Dilma Rousseff. After the Trump-friendly right-wing populist Jair Bolsonaro won the presidency in 2018, Havana withdrew them.

Their departure has now left some of Brazil’s most vulnerable communities underserved. The Health Ministry estimates that 90 percent of cases will be treated in the small public health clinics the Cubans once staffed.

As Brazil now tries to ramp up hiring at public hospitals and clinics, health officials have said they will start by recruiting Brazilian nationals. But after that, they say, they’ll look to a pool of 2,000 Cuban doctors who stayed in Brazil, either as refugees or as spouses of Brazilian nationals, after the Cuban government contracts were severed.

Alexandre Padilha, health minister under Rousseff, said the lack of Cuban medical staff means Brazil is “arriving at a critical time in the pandemic in worse shape than we were before.”

Faiola reported from Miami. Brown reported from Quito, Ecuador. Marina Lopes in Watercolor, Fla., and Ana Vanessa Herrero in Caracas, Venezuela, contributed to this report.