SAN SALVADOR, El Salvador — El Salvador arrested its former defense minister David Munguía Payé, alleging his involvement in a pact with the country's principle gangs in 2012, officials announced.

Attorney General Raúl Melara said late Thursday that Munguía was arrested for his actions in relation to the gang pact under the administration of then-President Mauricio Funes.

The government made a pact with the Mara Salvatrucha and Barrio 18 gangs to dramatically lower the country's murder rate. In exchange, the gangs' imprisoned leaders were moved from maximum security to medium security prisons where they were able to continue managing the gangs' operations.

Melara said the Attorney General's Office is also pursuing Funes, who fled to Nicaragua and received political asylum in 2016. He said investigators determined it was Funes and Munguía who conceived of and implemented the pact.

On Friday, Funes denied any involvement in the gang pact. "I never met with gangsters and nor did I order any official to do so," Funes wrote on Twitter. "I never ordered nor authorized prison privileges for any gang member."

National police arrested Munguía at his home Thursday.

His lawyer, Manuel Chacón, said he had still not been told of the charges against his client. Chacón said they had been aware of the gang pact investigation for some time, because Munguía was called to make statements about it to prosecutors various times.

Chacón said he will ask a judge to allow his client to not be held in jail while awaiting trial, because he is more than 70 years old and has sufficient familial and work ties to keep him from being a flight risk.

When Munguía was previously called to testify in another case related to the pact, he said that it was public policy born in Funes' security cabinet.

"My role was to facilitate the work of the mediators and receive reports from the mediators and members of the (Organization of American States) and keep the President of Republic informed of advances in the process," Munguía said.

During the pact, daily homicides dropped from about 14 to five. But the pact dissolved in September 2013 after the Supreme Court removed Munguía from his position and new authorities withdrew the privileges that imprisoned gang leaders had received. Homicides then rose again.