When Donald Trump said this month he would end temporary protected status for almost 200,000 Salvadorans, the number of immigrants standing to lose protections under this president approached the 1 million mark. This includes people, like those from El Salvador, that now stand to be deported to countries where their lives could be in danger. El Salvador has one of the world’s highest homicide rates—due in no small part to the policies of the country now trying to expel them.

Trump promised to end the protected status granted to Salvadorans in 2001 following a devastating earthquake. Then, a few days later, during a White House meeting on immigration policy, the president characterized places like El Salvador, along with Haiti, as “shithole” (or perhaps “shithouse”) countries. Unwilling to explicitly criticize the president for his intemperate remarks, Senator Marco Rubio expressed pity for the poor nation: “[T]he people of El Salvador and Haiti have suffered as the result of bad leaders, rampant crime and natural disasters.” Rubio omitted to note that one of the biggest disasters to befall El Salvador—one that created hundreds of thousands of refugees even before the post-earthquake wave—was man-made, with the United States, not nature, being a major force.

It was a civil war of the 1980s, one that pitted leftist revolutionaries against the alliance of countries, oligarchs, and generals that had ruled the country for decades—with U.S. support—keeping peasants illiterate and impoverished. It was a bloody, brutal, and dirty war. More than 75,000 Salvadorans were killed in the fighting, most of them victims of the military and its death squads. Peasants were shot en masse, often while trying to flee. Student and union leaders had their thumbs tied behind their backs before being shot in the head, their bodies left on roadsides as a warning to others.

President Trump might wonder what Ronald Reagan—one of his favorite presidents—was doing pouring billions of dollars of economic and military aid into the tiny country. In the early ‘80s, El Salvador was receiving more such aid than any country except for Egypt and Israel, and the embassy staff was nearly as large as that in New Delhi. For Reagan, El Salvador was the place to draw the line in the sand against communism.

Many Americans would prefer to forget that chapter in American history; those under the age of 40 may not even be aware of it. Salvadorans haven’t forgotten, however. In El Mozote and the surrounding villages of subsistence peasants, forensic experts are still digging up bodies—of women, children, and old men who were murdered by the Salvadoran army during an operation in December 1981. It was one of the worst massacres in Latin American history. But while Trump might smear the country’s image with crude language, today El Salvador has a functioning legal system—more than three decades after the event, 18 former military commanders, including a former minister of defense, are finally on trial for the El Mozote massacre.

Some 1,200 men, women and children were killed during the operation. Old men were tortured. Then executed. Mothers were separated from their children. Raped. Executed. Crying, frightened children were forced into the convent. Soldiers fired through the windows. More than a hundred children died; their average age was six.

“The United States was complicit,” Todd Greentree, who was a young political officer at the American embassy at the time, told me recently in an interview for a documentary about the massacre. Greentree noted that the massacre was carried out by the Atlacatl Battalion, which had just completed a three-month counterinsurgency training course in the United States. That training was also supposed to instill respect for human rights. The El Mozote operation was the battalion’s very first after completing the course.

When reports of the massacre first appeared in The New York Times and The Washington Post, the American ambassador, Deane Hinton, sent Greentree and a military attaché, Marine Corps Major John McKay, to investigate. They concluded there had been a massacre, and that the Atlacatl battalion was responsible, Greentree told me.

But that is not what Ambassador Hinton, a cigar-chomping career diplomat who died last year, reported to Washington. In an eight-page cable, he sought to lay the blame on the leftist guerillas. They had done “nothing to remove” the civilians “from the path of the battle which they were aware was coming,” he wrote. He then suggested that the victims may have been caught in a cross-fire, or as he put it, “could have been subject to injury as a result of the combat.” (Congress was also complicit because it continued to appropriate funds for El Salvador in spite of the military atrocities, says Greentree, who served in several diplomatic posts after El Salvador, including in Angola and Afghanistan, and has a doctorate in history from Oxford.)

The U.S.-fueled war drove tens of thousands of Salvadorans to flee the violence for safety in the United States. In the mid-90s, Clinton allowed their “temporary protected status” to expire. This decision contributed to the gang violence that marks El Salvador today—not long ago, when a day passed without a murder, it was banner news. Thousands of the refugees sent back were young men, who had either deserted from the army or the guerrillas during the war. And when they got back to El Salvador, with little beyond their fighting skills, they formed the nucleus of the gangs.

But El Salvador has made remarkable progress since the end of the war in 1992, and it is surely unfair to describe it as a “shithole.” Indeed, the country has held five presidential elections since the end of the war, all relatively free and fair, and with little violence. In 2009, after 15 years of right-wing presidents, Salvadorans elected elected a former guerrilla commander turned politician, and he was succeeded in the next election by another former revolutionary. The Economist describes El Salvador as a “flawed democracy,” and ranks it number 60 on its “democracy index,” ahead of Mexico and Singapore.

Given America’s history in El Salvador, one might think the United States owes the country’s citizens an apology, rather than disparaging epithets.