SAN SALVADOR (Reuters) - When El Salvador’s legislative assembly confirmed little-known Douglas Melendez as attorney general in 2016, many here thought it was business as usual in a country where high-level corruption has long gone unpunished.

El Salvador's Attorney General Douglas Melendez is interviewed by Reuters in San Salvador, El Salvador October 10, 2018. REUTERS/Jose Cabezas

But in less than three years, Melendez has put one former president in prison, investigated another and has a third in his sights. He has also jailed his predecessor, a judge and a top businessman, among others.

Some in El Salvador’s political class have seen enough.

Congress must vote before January 5 on whether the 52-year-old career prosecutor can stay on for another three-year term. Despite international support, Melendez has powerful opponents in the ruling leftist party. El Salvador’s lawmakers could make their decision as soon as this week.

Even if he survives that vote, the backlash is likely to continue. Melendez said he has received death threats. And the leading candidate in February’s presidential contest has talked of jail time for Melendez.

The U.S. government has paid for bulletproof cars for Melendez’s team. His family now travels with body guards.

“We do not have a lot of allies,” Melendez said in an interview at his offices in a wealthy area on the edge of San Salvador. “Often the public servant that does, or tries to do, their job independently makes people uncomfortable, and that brings repercussions.”

Growing pressure on Melendez is the latest sign that an anti-corruption drive that swept parts of Latin American in recent years may be faltering.

Judges and prosecutors across the region have made strides to clean up the region’s notoriously greasy politics. In addition to El Salvador, Peru, Guatemala and Brazil have all charged and imprisoned former presidents.

But those high-profile purges have bred resistance among political players whose power is threatened by their work.

In Guatemala, conservative President Jimmy Morales declined to renew the mandate of the International Commission Against Impunity in Guatemala (CICIG), a United Nations-backed body investigating him for corruption. Set up to assist Guatemala’s justice system stem decades of impunity, CICIG helped topple his predecessor over another graft case, and it won a 15-year jail sentence for a former vice president convicted of fraud and influence peddling.

Morales has said CICIG violated Guatemala’s constitution and due process, and that it was a “threat to peace”.

In Honduras, the head of a MACCIH, a similar body backed by the Organization of American States, resigned over lack of support from authorities.

“There are good things happening but it’s incredibly fragile,” said Eric L. Olson, a Latin America expert at the Seattle International Foundation, highlighting pushback across the region.

“There’s been a tremendous backlash against the attorney generals who attempt to be independent,” he said.

Slideshow ( 7 images )

Tiny El Salvador borrowed practices from its neighbors for its anti-corruption drive. Similar to graft-busters in Honduras and Guatemala, Melendez created a separate unit called the “Group Against Impunity”, which now has some 25 handpicked prosecutors working on the most high-profile corruption cases.

Local civil society has criticized the attorney general’s office for its lack of investigative ability, pointing out that successful cases have often relied on evidence gathered by others, such as the Supreme Court or journalists.

Melendez says he is working with a lean budget, and the attorney general’s office was infiltrated by organized crime when he arrived. He is currently prosecuting his predecessor Luis Martinez for money laundering, illicit negotiations and a slew of other crimes.

Martinez allegedly accepted bribe payments in cash, trips and cars from powerful people to protect them. Martinez denies the charges. His lawyer declined to comment.

POWERFUL CRITICS, INTERNATIONAL BACKING

Melendez grew up in a humble town in eastern El Salvador, a country of just 6 million people. He helped the attorney general’s office set up its first anti-corruption unit.

Media-friendly Melendez has at times broken unwritten rules of propriety to grab headlines, earning him criticism.

Conservative former President Antonio Saca, who is now serving 10 years in prison for embezzlement and money laundering, was taken into custody at his son’s black-tie wedding in an upscale part of San Salvador.

Melendez famously insulted the partner of leftist former President Mauricio Funes, comparing her to a public works project because so much taxpayer money allegedly was spent on her upkeep, including for plastic surgery.

Funes said no public money was spent on plastic surgery, and that Melendez’s comment was sexist.

The attorney general is currently trying to extradite Funes from Nicaragua, where he fled to escape charges of embezzlement and money laundering.

Like Funes, many of the political figures Melendez has pursued are linked to the ruling Farabundo Marti National Liberation Front or FMLN, the former leftist guerilla army that became a political party at the end of the country’s civil war in 1992. Party members say that is evidence of his bias.

In an email to Reuters, Funes said Melendez got witnesses to implicate him falsely through plea-bargain deals while letting conservative politicians linked to graft off the hook.

“The case against me is a clear example of the use and manipulation of criminal justice by the right,” Funes said. “For that reason I decided to stay in Nicaragua.”

Melendez defends his record saying that people will always push back against being investigated, and that politicians on both the left and right think he is biased against the other.

The center-right candidate leading the polls to become El Salvador’s next president, Nayib Bukele, is certainly no fan of the attorney general.

Melendez has investigated Bukele for a variety of allegations, including violence against women, but never charged him. The two men regularly trade barbs publicly.

Bukele delivered a sharp warning to his nemesis earlier this year at a speech to supporters in the United States, where around a quarter of Salvadorans live.

“The lesson...should be clear for this attorney general,” Bukele said. “Do not abuse power if you do not want to end up in [prison] being abused.”

Still, Melendez has some powerful backers of his own, particularly in the international community. Foreign governments and international bodies including the United Nations have offered support and funding for his work.

The United States gave $72.8 million in bilateral assistance to El Salvador in 2017, an official at the U.S. State Department said, supporting security, justice and violence-prevention initiatives in the attorney general’s office as well as other institutions.

“Corruption is one of the principal inhibitors of economic growth in El Salvador and a key driver of illegal immigration to the United States,” the official said.

Melendez has been tougher on corruption than any top cop in El Salvador’s modern history, said veteran Justice Sidney Blanco, who recently stepped down from the Supreme Court.

“It is really difficult to predict what a new attorney general would do if they do not reelect [Melendez],” he said. “Right now we are living a crucial moment.”

As for Melendez, he says his effectiveness is what ultimately may work against him.

“I think future governors in this country will think twice about stealing money,” Melendez said. “That makes you want to carry on, but in the end it will be the politicians that decide.”