MEXICO CITY (AP) — Attorney General Raul Cervantes resigned Monday, saying he doesn't want to be a distraction in the effort to pass legislation that would make Mexico's top prosecutorial agency more independent.

Cervantes told the Senate his resignation was effective immediately and urged Congress to quickly approve "the urgent laws that the country needs," which have been stalled for months.

Mexico recently approved constitutional reforms meant to replace the Attorney General's Office with a more independent chief prosecutor whose new nine-year term would make the office less vulnerable to pressure from presidents, who serve six years.

The initial legislation to enact that change would have transformed the existing attorney general into the new chief prosecutor. That alarmed opposition politicians and non-governmental organizations, who argued that Cervantes was an ally of President Enrique Pena Nieto and might ensure that his administration was not investigated for any wrongdoing after leaving office next year.

Cervantes, Pena Nieto's third attorney general in five years, took over the high-pressure post a year ago. Among the chief controversies he faced was a probe into a disappearance of 43 students from a rural teacher's college who had been attacked by local authorities in the southern state of Guerrero on Sept. 26, 2014.

Pena Nieto's first attorney general, Jesus Murillo Karam, announced officials had arrived at the "historic truth" in the case, but his reputation was scarred when that version was largely discredited by independent international experts. Gomez replaced him in 2015 and led efforts to re-examine the case.

In his speech to the senators Monday, Cervantes said the Attorney General's Office had pursued cases against officials — governors and mayors — who had previously felt untouchable.

He also tantalizingly suggested that a long-awaited corruption investigation into activities of the Brazilian construction firm Odebrecht and Mexico's state-owned oil company Pemex had concluded. In August, the office had said that Odebrecht acknowledged paying $10,500,000 in bribes to Pemex officials.

Without naming either of the companies, Cervantes said "the Attorney General's Office has finished investigations into one of the biggest international corruption schemes that has been seen in Latin America and Mexico. The complex scheme to corrupt officials, to improperly obtain public contracts and later to try to hide the ill-gotten gains in fiscal paradises, tested our determination and our institutions."