Mexico's Senate on Friday passed the most dramatic political reform in decades that would allow re-election of some public officials, create new electoral oversight and make the Attorney General's office independent from the executive.

It is the latest in a series of reforms backed by President Enrique Pena Nieto that have been approved by Mexico's legislature in the last few weeks. The other reforms have targeted Mexico's education system, its state-run oil company, its telecommunications sector and its banking system.

The political reform approved late Friday would relax Mexico's ironclad ban on the re-election of some federal and local legislators and mayors, allowing them to run for office again and remain in the post for up to 12 years. But it would still limit presidents and state governors to single, six-year terms. It also would allow independent candidates to run for public offices.

Allowing re-election of lawmakers and mayors would give political party bosses less control over the future of politicians, and letting independent candidates run would erode the parties' control over elections, observers say.

The final step for the political reform, which was approved by the lower house of Congress earlier this week, is approval by 17 of Mexico's 31 states.

Re-elections would be allowed starting in 2018.

Mexico banned re-election in 1933, following a revolution to overthrow Porfirio Diaz, who was elected president in rigged voting several times and stayed in power for 35 years.

The bill also authorizes Mexico's National Electoral Institute to name the president and members of each of the 32 states' electoral institutes. State congresses currently name them.

Most of Mexico's 32 states are ruled by members of the Institutional Revolutionary Party, or PRI, and opposition leaders say governors have a lot of influence on local congresses, and therefore election authorities.

Senators also approved giving autonomy to the Attorney General's office and requiring that the Senate approve the candidate to top prosecutor proposed by the president, a move that seeks to avoid political prosecutions.

The plan also requires small parties to get at least 3 percent of the vote to qualify for lucrative public funding, up from the current 2 percent.