Attorney General Douglas Meléndez Ruiz addresses reporters in San Salvador after his swearing-in in January. (Marvin Recenos/AFP/Getty Images

SAN SALVADOR — The elevator operator, the man who escorts visitors to the sixth-floor office of El Salvador’s top justice official, happens to be blind.

Whether that is coincidence, or an intentional flourish on the part of the Central American country’s new attorney general, Douglas Meléndez Ruiz, the symbolism fits with the mood of cautious optimism surrounding his appointment.

El Salvador, Meléndez will be the first to tell you, is a country awash in crime. It is plagued by kidnappings, extortion, thefts from government coffers and residents’ back pockets and — although it is just the size of Massachusetts — one of the world’s highest homicide rates. That level of criminality, gang activity and impunity makes his job a crucial one for the country. And with thousands of Salvadorans fleeing the violence headed toward the Texas border, an important one for the United States, too.

The government of President Salvador Sánchez Cerén, a former leftist guerrilla commander in the civil war, has doubled down on an aggressive strategy against the dominant street gangs. It will fall to Meléndez, who was 49 when he was sworn in in January, to decide whether to prosecute police and soldiers if they commit human rights abuses, as well as to pursue cases against public officials accused of corruption. Since starting the job, Meléndez has announced charges against off-duty police officers allegedly involved in extrajudicial killings, but he has also gone after civilians who he says broke the law in negotiating a 2012 gang truce, a move that critics have described as a political witch hunt.

In a recent interview in his office, Meléndez stressed that no one is above the law, but he also warned that his office was underequipped and needed to be free of political interference. He said the office’s $43 million budget should be raised to at least $70 million, to hire more prosecutors, modernize equipment and add to a depleted fleet of vehicles. He also follows an attorney general, Luis Martínez, who faced corruption allegations and calls from U.S. lawmakers for his removal.

“If the attorney general’s office is given sufficient resources, and permitted to work, the office can do what’s necessary,” Meléndez said. “If you don’t have these two elements, one might have to look for other external mechanisms.”

Meléndez was alluding to neighboring Guatemala, where a U.N.-backed body called the International Commission Against Impunity in Guatemala, known by the Spanish initials CICIG, has helped prosecutors take down a president and a slew of high-level officials on corruption charges. Meléndez said a CICIG-type organization was not necessary in El Salvador “at this moment,” but might be if his conditions weren’t met.

Meléndez said he has written to U.S. Ambassador Jean Elizabeth Manes to ask for resources as the United States works on divvying up the $750 million appropriated under a new effort to combat crime and stop the flow of immigration from Central America.

“The one who is attacking crime and prosecuting corruption is the attorney general’s office,” Meléndez said. “We are an independent institution, we are not the government, so we should have that taken into account.”

Meléndez was something of a surprise pick by El Salvador’s congress for the top law enforcement job. According to Salvadoran press reports, he grew up in humble circumstances, attended law school in the capital and then began working for the government in his 20s. One of his first government jobs was in the human rights department of the attorney general’s office, not long after a 1992 peace accord ended El Salvador’s 12-year civil war. As a prosecutor, he has handled cases brought against soldiers and police accused of assassinations and civil-war-era crimes. While rising through the ranks, he developed a reputation as an honest and competent prosecutor.

“Being honest in that kind of job, you’re just miles ahead of everybody else,” said David Holiday, a Central America expert at the Open Society Foundations, who recently met with Meléndez. “He seemed sincere, but he also seems alone.”

Holiday said he was impressed that Meléndez has seemed intent on pursuing corruption allegations against former presidents, including Mauricio Funes. Melendez is also looking into Funes’s role in the gang truce case.

So far, that case has been Meléndez’s most controversial. This month, he announced that 18 people had been arrested, and that others were under suspicion, for their roles in negotiating with gang members for a truce that lasted for two years. One of those under investigation, columnist Paolo Lüers, who participated in the gang talks, said that they had been working on behalf of President Funes and his ministers.

“It was a public policy defined by the government,” he said, adding that the case “is completely political” and those in jail are “political prisoners.”

Meléndez adamantly defended the investigation and said that the ultimate crime of the negotiators was to offer the gang leaders the right to traffic drugs and commit other crimes if they lowered the homicide rate. Meléndez didn’t specify who allegedly made such deals.

“The church, the state, can look for certain solutions to the problem. But can they violate whatever law and commit crimes under this pretext? No,” Meléndez said. The negotiators “acted with total impunity and disdain for the law, and this is dangerous.”

Meléndez has called for toughening the laws against gangs, but he seemed hesitant about the effectiveness of what the Sánchez Cerén administration calls the “extraordinary measures” it has taken in the war on gangs. Those include sealing off several prisons from visitors and blocking cellphone calls to cut off gang communications. The government has also deployed new rapid-reaction battalions of soldiers and police for raids against gang members. Government officials credit the policies with bringing about a recent dip in the homicide rate. Meléndez said they should be temporary and “totally supervised.”

“I don’t have total certainty that the measures are what’s 100 percent causing the drop in homicides,” Meléndez said. “In their application, they shouldn’t violate fundamental rights, not of investigators, criminals, nor third-party citizens who have nothing to do with it.”

Meléndez has taken other steps to crack down on gang violence. After a massacre in the town of San Juan Opico in March, he flew to the crime scene and announced that “the time has come for the state to give answers to the people,” adding that “every institution should show a willingness to attack crime.” He has proposed legislation that would make it a crime to impede free transit, essentially targeting anyone operating a gang checkpoint in a village, or acting as a lookout. He also proposed punishing gang attempts to recruit students in schools.

“We can’t let the criminals hold territory,” he said. “They have been in control over who enters, who leaves, who sells, who does business. And whoever enters and doesn’t pay, they die.”

“Too many people, citizens, individuals, are being affected,” he added. “And they don’t feel that the rule of law is prevailing over criminals.”