SAN SALVADOR — El Salvador’s attorney general has begun arresting law enforcement officials who helped carry out a truce between gangs that, until just a few years ago, was central to the nation’s strategy for taming its infamous violence.

The truce, struck by El Salvador’s biggest gangs with the government’s support, won international backing and helped bring down the nation’s devastating murder rate by more than half in 2012 and 2013.

But the government’s role in facilitating the truce caused controversy at home, and the nation’s leaders have switched to a very different approach, cracking down in a no-holds-barred campaign to crush the gangs.

Attorney General Douglas Meléndez has already arrested one of the main mediators of the truce, along with about 20 law enforcement officials who helped carry it out.