FOR MORE than a decade, Mexico’s congress was mired in three-way gridlock, making passage of desperately needed fiscal, economic and social reforms almost impossible. Now, under new president Enrique Peña Nieto, Mexicans are proving that political grand bargains can happen — and that democracies can tackle their toughest problems.

In a matter of months, their legislators have approved groundbreaking shake-ups of labor law and education, stripping unions of their corrupt control over teaching positions and making it easier for companies to hire and fire workers. Now they are moving toward passage of legislation that would break up virtual monopolies in telecommunications. America Movil and Televisa, two of Mexico’s biggest private companies, would lose their dominance over the mobile phone and broadcast television markets — a grip that costs the Mexican economy tens of billions of dollars a year.

The reforms mean targeting some of the country’s most powerful figures: Carlos Slim of America Movil, who is the world’s richest man, and Emilio Azcárraga, whose Televisa network employs Mr. Peña Nieto’s actress wife and favored his presidential campaign. The oligarchs’ losses will be balanced somewhat by the opportunity to compete in each other’s markets. But the government also staged a show of force against the legendary and high-living boss of the teachers union, arresting her on corruption charges.

These reforms were accomplished thanks to a political pact that Mr. Peña Nieto negotiated with the country’s two opposition parties, representing the right and left ends of the political spectrum. If the president has his way, even bigger and more politically sensitive initiatives are on the way. At the beginning of this month, he persuaded his Institutional Revolutionary Party, which dominated Mexican politics until the turn of this century, to support a fiscal reform that would permit taxes on food and medicines, and private and foreign investment in oil production. Though the government is still negotiating with the political parties on the shake-up of state oil monopoly Pemex — Mexico’s most sacred political cow — it’s possible that multinationals will be able to begin drilling for oil in deep waters off the Mexican shore through joint ventures, as they are doing already in Brazil.

The burst of change contrasts dramatically with the opening months of Mr. Peña Nieto’s predecessor as president, Felipe Calderón, who chose to launch an all-out war against the country’s drug-trafficking cartels. The massive offensive led to the capture and death of a number of cartel leaders, but the trafficking of cocaine and associated violence continues almost unabated. Mr. Peña Nieto’s foreign minister, José Antonio Meade, told us during a visit to Washington last week that the new administration plans to build on Mr. Calderón’s large expansion of police forces while aiming to combat trafficking by attacking its “root causes,” such as poverty and the lack of employment.

Some in the Obama administration worry that the new president is diverting resources and focus from the drug war. Yet Mr. Peña Nieto is tackling problems that have held back Mexico for a generation, helping to create the economic misery that empowers the drug cartels. Washington should be cheering Mexico’s gridlock busting — and taking it as an example.