The Philippines opposition hoped to use this week's elections to check Rodrigo Duterte's increasingly authoritarian leadership.
Yet, the Filipino president appears to have secured a victory greater even than he expected, with his allies set to dominate the key institutions of the state.
Duterte can use this political capital to push forward sweeping reforms that strengthen the Philippines' vulnerable public institutions. At the age of 74, he could make the most of his remaining three years in office by focusing on leaving a good legacy to his successors.
But there are fears that the elections result will reinforce Duterte's worst instincts, tempting him to capitalize on victory to bolster his own power. With his allies dominating the legislature, Duterte may have a carte blanche to push his disruptive and authoritarian brand of government to its logical conclusion.
More than 18,000 positions, including up to 300 seats in the legislature, were up for grabs in the May 13 polls. Capping their overall win, the president's allies seized control of the 24-member senate, the upper house of parliament.
An assembly that has traditionally acted as a check on the executive could now become its most powerful weapon. Duterte needs a supermajority in the Senate in order to push ahead with his most ambition plan yet, namely the introduction of a new constitution.
The result also clears the way to enacting draconian draft laws that the Senate has previously rejected from Duterte including the death penalty and reducing the age of criminal responsibility to nine.
Since coming to power in 2016, the tough-talking president has overseen a brutal drug war, which has claimed the lives of thousands of suspected drug dealers, while snubbing traditional Western allies in favor of closer ties with China.
Almost uniquely in the world, Filipino presidents are allowed only a single six-year term with no option of reelection. This rule was set largely in reaction to the dictatorship of the 1970s and early 1980s, when President Ferdinand Marcos repeatedly extended his term in office.
The Philippines' democracy, with its directly-elected executive president, is closely patterned on that of the United States, a former colonial master.
Unlike in America, however, midterm elections in the Southeast Asian country tend to favor the incumbent, strengthening the sitting president's ability to accomplish signature policies in final years of office.
It is a measure of Duterte's triumph that in almost a century of electoral competition, opposition forces have managed to defeat the incumbent's allies only three times before -- in 1951, 1971 and 2007.
Even more than usual, the incumbent's allies benefited from the endorsement power of the sitting president and his access to state resources, including cash and administrative backing.
Moreover, Duterte's approval ratings have surged to a historic-high of 81%, the highest on record for any Filipino leader, according to the Social Weather Stations' latest survey.
Duterte's popularity has several roots. Authoritative surveys, for example from Pew Research Center, show that only 15% of Filipinos are categorically committed to democracy, with vast majority of the population willing to embrace authoritarian leaders that can break the gridlock in state institutions. Duterte's brand of leadership fits perfectly.
The Filipino president is also benefiting from rapid economic growth as well as a steep reduction (halved from 6% in third quarter of 2018 to only 3% in second quarter of 2019) in inflation over the past six months, thanks to massive import of cheap food ahead of the elections.
While Duterte's China-leaning foreign policy has caused misgivings in the defense establishment and parts of the elite, it was less of a concern for the average voters during the midterm elections.
Crucially, Duterte, unlike the divided and leaderless opposition, used the election campaign not only to endorse his allies, but also to our the country, project power and decisiveness, and win over the hearts and minds of the vast majority.
Meanwhile, the opposition was hobbled by limited resources, hostile local authorities unwilling to host events, a dearth of charisma and, above all, a convincing counter-narrative to mobilize voters.
In the past, the midterm senate race has roughly followed a "6-3-3" formula, with the president's supporters winning roughly half the 12 seats up for grabs, while the independents and opposition split the rest.
This time, however, the opposition struggled to secure a single seat, even though it had such prominent candidates as Beningo "Bam" Aquino, a relative of former President Benigno "Pinoy" Aquino, as well as former senator and presidential candidate Mar Roxas.
Duterte is looking toward a senate, where his allies and the loyal opposition members occupy close to two-thirds of all seats.
For Duterte the lure of power is clear. He has plans to reform the constitution to diffuse power to the peripheries away from so-called "imperial Manila." But his critics see this as a plot to bolster his own position, and that of local power brokers, at the expense of institutional checks and balances against an authoritarian presidency.
The president should instead focus on uniting the country and pushing for much-needed structural reforms. To truly reward his many supporters he needs to sustain economic growth and ensure a much more even distribution of wealth and political authority. This is a country dominated by some 40 rich families.
Duterte can start by delivering on the pledges of "real change" he made three years ago and open up the economy to competition, clip the power of traditional elite, and give greater attention to the neglected peripheries.
Instead of controversially introducing an entirely new constitution, he could instead reform rules, which hobble competition and concentrate power in the hands of few. He could, for example, consider restrictions on political dynasties passing on elected office reducing constitutional obstacles to foreign investments. and adopting progressive tax policies to ensure the fruits of economic growth trickle down to ordinary Filipinos.
A presidential power grab would only set the country back in terms of development and risk a political backlash in a nation with a dark history of dictatorship.
Richard Heydarian is a Manila-based academic, columnist and author of "The Rise of Duterte: A Populist Revolt Against Elite Democracy" and forthcoming "The Indo-Paciifc: Trump, China and the New Global Struggle for Mastery."