As the final results of the parliamentary election on Dec. 6 came in — two days after the vote — Venezuela's president, Nicolás Maduro, was at an army barracks in Caracas preparing for his weekly television show, "In Contact with Maduro." Venezuela's presidents have been making hourslong broadcasts since the late Hugo Chávez, his charismatic predecessor, took power in 1999. Maduro's appearance from the Montaña barracks, a fortified mock castle where Chávez's body now lies, was the first to follow an election defeat.

It was a crushing one.

Venezuelans voted furiously against the left-wing regime and for an opposition coalition, the Democratic Unity alliance (MUD), that is determined to bring its increasingly authoritarian and incompetent rule to an end.

Nearly three-quarters of the electorate turned out, some despite fears that their ballots would not be secret. The MUD won the popular vote by a margin of 15 percentage points. It captured just over two-thirds of the seats in the National Assembly, which gives it broad powers to challenge the government.

The result is a clear rejection of the "Bolivarian revolution" and its economically illiterate ideology, "21st-century socialism." Chávez won support from poor Venezuelans for more than a decade with price controls and lavish social spending. Maduro has neither his charisma nor his luck with oil prices. Basic goods are now in short supply, inflation is in triple digits and the economy is expected to contract by about 10 percent this year.

Yet the swing to the opposition does not give Venezuela an easy way out of its troubles. The MUD is firmly in control of parliament, but the government remains in the hands of Maduro, who is not scheduled to face an election until 2018. Venezuela's direction over the next several months will depend primarily on how these two forces, each of them internally divided, deal with each other.

There is little sign of incipient cooperation. Broadcasting from the Montaña barracks, Maduro declared he would "not accept" one of the MUD's top priorities: an amnesty law that would free 70-odd political prisoners, including Leopoldo López, a former mayor jailed for 14 years on trumped-up charges of inciting violence during protests in 2014. Maduro thundered that the "murderers have to be prosecuted, and have to pay."

The outgoing president of the assembly, Diosdado Cabello, thought to be Venezuela's second-most powerful leader, announced on the same show that the government will appoint a dozen new Supreme Court judges before the legislature dissolves later in December. The MUD wonders what other measures the regime will take to fortify its position before the new assembly convenes on Jan. 5. There is speculation that it will extend an "enabling law" that allows the president to pass laws by decree.

The constitution, rewritten and amended under Chávez, gives the opposition means to fight back. After its election win it can reject the government's budgets and veto the president's longer foreign trips.

With a two-thirds majority of the assembly, the MUD can dismiss and appoint Supreme Court judges and members of the electoral commission. This is not a straightforward process. To unseat a judge, the assembly must charge him with a "grave offense," which must be seconded by one of a trio of government-appointed officials. The assembly can impeach ministers more easily, but the government can then appoint his or her successor.

The constitution allows for more drastic measures. With its "supermajority" the MUD could summon a convention to rewrite the constitution. More likely is a move to initiate a referendum to recall Maduro from office, followed by a new presidential election.

This would require the signatures of a fifth of the electorate and could happen starting in early 2016 (when Maduro will have served half of his six-year term). If he is recalled after the early part of 2017, the vice president would serve out the rest of Maduro's term.

Confrontation between the government and the legislature will not ease the plight of ordinary Venezuelans. The slump in oil prices and the government's reckless spending have greatly diminished the country's stock of foreign currency. There are fears that it will default on its foreign debt in 2016. The government has given no indication it is prepared to undertake the reforms necessary to stabilize the economy. In the short run those measures, including a devaluation of the bolívar, realistic prices for petrol and other goods and a smaller budget deficit, are likely to deepen the economic distress.

The MUD, an ideologically diverse group of small parties united only in its opposition to chavismo, is not much readier to cope. It promised voters change but offered no coherent economic plan. Yet its victory was a precondition for progress. However the drama plays out, the election has brought Venezuela closer to economic sanity and democratic renewal.

Copyright 2013 The Economist Newspaper Limited, London. All Rights Reserved. Reprinted with permission.