On December 2, 2012, the day after he took office, Mexico’s President Enrique Peña Nieto did the unthinkable. Along with the leaders of his own Institutional Revolutionary Party (PRI), the National Action Party (PAN), and the Party of the Democratic Revolution (PRD), he signed the Pact for Mexico. The Pact muted the political gridlock that had hounded Mexico since the PRI lost control of Congress for the first time ever in 1997, securing the passage of 11 major structural reforms that touched on various sectors of Mexico’s economy. Presidents Vicente Fox and Felipe Calderón, both of the PAN, sought such reforms in the decade before Mr. Peña Nieto’s ascension to the presidency, but both failed to secure sufficient congressional support.

The Pact for Mexico was the logical next step in Mexico’s modernization, a process that began with President Miguel de la Madrid’s embrace of economic liberalization in the 1980s, continued with the implementation of the North American Free Trade Agreement (NAFTA) in 1994, and progressed further with Mr. Fox’s groundbreaking victory over the PRI in the presidential election of 2000. Characterized by a tendency toward economic openness and competition, the reforms were intended to push Mexico beyond the disappointing average annual GDP growth rate of 2.4% of the three decades prior to 2012. From abroad, experts and major publications heaped praise on Mr. Peña Nieto. Memorably, he appeared on the cover of Time with a headline that declared he was “Saving Mexico.”

But not all in Mexico agreed with these optimistic assessments of the reforms, especially not those affiliated with the National Regeneration Movement (Morena), a left-leaning political party. The National Coordinator of Education Workers (CNTE), a radical offshoot of Mexico’s largest teachers’ union, were also among the dissenters. Morena, emerging as a major political party at the time of the reforms’ formulation, gained support by fervently criticizing the reforms and labelling them a nefarious scheme to subvert Mexico to foreign interests by the “mafia of power.” Meanwhile, the CNTE staged strikes in some of Mexico’s poorest states, like Oaxaca and Chiapas, keeping students out of school for months on end. Their cause was strengthened as the PRI government was engulfed in a series of corruption scandals and the public’s perception of Mr. Peña Nieto deteriorated, with his approval rating falling to an abysmal 17% by February 2017.

Unsurprisingly, the structural reforms have been a major point of contention on the 2018 presidential campaign trail. Front-runner Andrés Manuel López Obrador, Morena’s founder and candidate, has promised to repeal the education reform and review contracts agreed under the auspices of the energy reform if he is elected president. Second-placed Ricardo Anaya, representing a PAN-PRD coalition, supported the reforms as a congressman and has said he would keep the reforms if elected, though he has criticized their implementation. Lastly, José Antonio Meade PhD ’97 of the PRI has consistently defended the reforms but has failed to gain traction, facing biting criticism for his ties to the current administration after serving in Peña Nieto’s cabinet as Secretary of Foreign Affairs, Social Development, and Finance—all at different times.

Regardless of the election’s outcome, the reforms must be kept in place. Independently of the Peña Nieto administration’s flaws, the reforms are an important accomplishment for Mexico. It is no wonder that the two administrations that immediately preceded Mr. Peña Nieto’s unsuccessfully pursued the approval of similar measures. The structural reforms represent changes Mexico needs in order to be successful going forward.

Critics of the reforms will point out that the reforms have not resulted in any significant uptick in economic growth to close out Mr. Peña Nieto’s term, but immediate results are not a fair expectation as that was never the intention. The structural reforms were designed to boost Mexico’s competitiveness in the long term, and their effects will be seen as their implementation continues. In its Economic Survey of Mexico 2017, the Organization of Economic Cooperation and Development (OECD) estimated that the reforms could add an additional percentage point to GDP growth within the next five years, but noted that their implementation is an ongoing process.

***

The educational reform is at greatest risk of being overturned. The CNTE launched an indefinite strike demanding its repeal on June 4, less then a month away from the election. At the third presidential debate on June 12, Mr. López Obrador declared, “I am going to cancel the essence of the educational reform; what was approved was not an educational reform, but a labor reform.” The CNTE’s complaints, echoed by Mr. López Obrador, center on the reform’s creation of an evaluation system for public school teachers based on standardized testing of students and a merit-based selection process for candidates to become teachers.

Historically, the Mexican government has allowed the teachers’ unions to play an important role in hiring public school teachers. The unions have made it almost impossible to fire incompetent teachers, and have even made it possible for teaching positions to be sold or inherited. Such practices have devastated Mexico’s education system—Mexico is ranked dead last in education within the OECD, and on the international PISA exam in 2012, 55% and 41% of Mexican students failed to demonstrate proficiency in math and reading, respectively. These outcomes will only change if the quality of public education is improved, and important considerations in accomplishing this goal include the evaluation of teacher performance and the qualifications of those wishing to enter the profession. The point of all this is not to punish teachers, but to create favorable conditions for students to learn.

The educational reform was designed to raise the standards for education in Mexico for the sake of Mexico’s students. Besides addressing the evaluation and hiring of teachers, it establishes guidelines for curriculum content, school resources, and access to education for marginalized communities and special-needs students. Getting rid of the educational reform would rob Mexico’s students of the advancements it secured, and in a global economic landscape defined by increasing automation and rapid technological change, a substandard education could have severe ramifications for a student’s future.

***

The energy reform has also been subject to much scrutiny by critics. Mexico’s oil industry was nationalized in 1938, and the monopoly held by Pemex, the state-owned oil company, quickly became a source of national pride. This pride has fueled criticism of the reform, as Martí Batres, then the president of Morena and now a candidate for the Senate, made clear at a rally celebrating the 76th anniversary of the expropriation on March 18, 2014: “Enrique Peña Nieto is the Porfirio Díaz or Santa Anna of our time, he plans to give our oil to transnational companies.” Mr. López Obrador himself said in August 2013 that “to privatize oil is to betray the country,” although he has since softened his tone on the campaign trail, promising to keep the reform and revise contracts agreed under its term instead. Such allegations of treason leveraged against the reform stem from the fact that it ended Pemex’s monopoly by allowing private companies, both domestic and foreign, to bid on the right to extract and distribute oil from certain fields, either independently or in conjunction with Pemex.

Pemex can no longer enjoy the luxury of refusing foreign investment. After peaking at 3.2 million barrels per day (bpd) in 2008, the company’s crude oil production began a decade of decline, falling to 2.27 million bpd by 2015. This decline can be explained by crumbling infrastructure, and has important repercussions for Mexico: the Mexican government has relied on the income from Pemex’s crude oil sales for as much as a third of its budget in recent decades. Pemex’s situation has gotten so bad that the Mexican government has had to make large cuts to its own budget while flushing Pemex with bailout money. This problem could be fixed by boosting crude oil production, but in order to do so, the Mexican government must allow Pemex to take advantage of capital from abroad.

The Mexican government is still Pemex’s sole owner, and the reform brought with it a promise to use higher income from crude oil sales to fund social programs like scholarships and pension funds. Mexican gasoline prices are now determined by the market rather than by the government, which resulted in a steep rise in prices in January 2017 that sparked fierce protests throughout the country.

However, this is ultimately to the benefit of Mexico’s poorest citizens. Subsidizing gasoline prices requires the use of tax funds collected from all Mexican citizens, rich and poor, but this practice provides a larger discount for richer citizens who drive more and use more gasoline. Removing the subsidy frees up more revenue that the government could use to support its most underprivileged citizens, leveling the playing field for them.

The reform opened the entire energy sector to private competition, which means that it will also result in lower electricity and natural gas prices for consumers in the long run. The success of another structural reform that cracked down on private oligopolies in telecommunications offers hope for the future of the energy reform. According to Mexico’s Federal Telecommunications Institute, consumer prices in the telecommunications sector dropped by 23% within the first four years of the reform being enacted. Although the energy reform has not yet yielded the same success, some experts project a 30% drop in the price of electricity by 2021. It will take time for the energy reforms’ benefits to be reaped, but the wait will be worth it for Mexico’s consumers.

Getting rid of any of the structural reforms would be a step backwards for Mexico. By opening markets and taking concrete steps to improve the quality of Mexico’s education system, the reforms stand to benefit Mexico’s consumers and students. It is still too early to fully assess the reforms’ effects, but they have already begun to bring about beneficial change. Mexico’s next president must keep the reforms in place if he is to fulfill his most important duty: to protect the interests of all Mexicans.