Mexico's presidency moved against two state governments, saying they had flouted federal anti-corruption laws, setting the scene for a possible conflict with two outgoing governors tarnished by graft accusations.

President Enrique Pena Nieto's office dubbed unconstitutional new state prosecutors' offices set up in oil-rich Veracruz and tourist hub Quintana Roo, bodies perceived by critics to be aimed at shielding the two outgoing governors. It called on the Supreme Court to rule against the measures.

Salvador Silva, a senior official at the attorney general's office, said earlier this week both states needed to wait for the roll-out of a federal government anti-corruption reform, rather than legislate individual measures.

"(The anti-corruption reform) is aimed at creating mechanisms which slam the brakes on abuse of power," Silva told a news conference on Monday.

Economists and financial sector professionals regularly cite impunity and weak rule of law as a major concern for investors in Mexican assets.

U.S. indictments are outstanding against at least three former governors from the ruling Institutional Revolutionary Party, or PRI, but no formal proceedings have been opened against them in Mexico so far.

Accused by critics of misusing public funds and failing to tackle rampant impunity, departing Veracruz Governor Javier Duarte's six-year term has been notorious for the killings of journalists and violent crime. Duarte has denied any wrongdoing.

Duarte on Twitter called on his state's justice commission to cancel naming a new anti-corruption prosecutor.

"We think the federal government is serious this time," said Hilario Barceleta, an economist at the University of Veracruz. "The level of corruption going on in Veracruz is so great the federal government has realized it has to intervene."

Duarte's counterpart in Quintana Roo, Roberto Borge, has also been accused of corruption by the opposition.

Quintana Roo and Veracruz are among the states the governing PRI lost control of in regional elections in June, when voters punished Peña Nieto and his party for failing to crack down on corruption and tame drug gang violence.

That rout helps set the tone for the next presidential election in 2018, underscoring deep discontent over graft scandals and a sluggish economy, and throwing the contest open to contenders from both the left and right.