Last weekend, Poland’s voters went to the polls — and delivered a divided Parliament. The controversial Law and Justice (PiS) party maintained its majority in the lower house of Parliament, the Sejm, winning the same number of seats — 235 of 460 — as in the 2015 election. However, the Senate, which had been controlled by PiS, was narrowly won by the opposition with 51 of 100 seats. That threatens PiS’s dominance, which critics believe has undermined the country’s democratic institutions.

How did the opposition manage to win control of the Senate?

Here’s how: The three main opposition parties joined in an informal alliance, specifically to oppose PiS. Poland elects members of the Sejm through a proportional representation electoral system — in which parties win seats roughly in proportion to their share of the national vote. But members of the Senate are elected by district, with the seat taken by whoever wins the most votes. Instead of running against one another, the opposition alliance fielded one candidate per district. This prevented the opposition vote from being split across different candidates, as happened in the 2015 parliamentary elections.

This time, while the opposition parties campaigned separately and held different positions on particular issues, collectively they vowed to defend democratic institutions and judicial independence from PiS control.

Of the 51 opposition senators, 48 come from the three opposition alliance parties: the Civic Coalition (KO), the conservative Polish People’s Party (PSL) and the Left alliance. Three additional senators ran officially as independents but were endorsed by the KO.

Why does the opposition’s Senate win matter?

The Senate victory has great symbolic importance: It is the first state institution that the opposition has regained since 2015, when PiS won the Sejm, Senate and presidency. While the Senate has less power than the Sejm, controlling even one institution substantially improves the opposition’s situation.

Most important, the opposition will now be able to slow down legislation, using a rule that enables the Senate to delay a bill for 30 days. No longer will the PiS majority be able to pass legislation literally overnight — as happened with some controversial bills, which the Sejm and Senate passed and were then signed into law by the president within 24 hours.

During this 30-day period, the Senate will be able to pass, amend or reject the bill. If rejected, the bill returns to the Sejm, which can override the Senate’s decision with an absolute majority vote. This vote requires a minimum of half (230) of the Sejm members to be present.

Since PiS holds 235 seats, the Sejm can easily override the Senate. But the 30-day delay still limits the power of PiS leader Jarosław Kaczyński, who controlled both houses of Parliament and the executive branch during the previous term.

If the Senate fails to act on a bill within 30 days, it automatically goes to the president, who can sign or veto it. President Andrzej Duda, elected as a PiS candidate in 2015, has used his veto several times — most prominently after mass protests against restricting judicial independence in July 2017. Later, however, Duda proposed similar legislation that became law.

The Senate can also influence certain political appointments. The Senate directly appoints two of the 25 members of the National Council of the Judiciary (KRS), the body responsible for selecting Polish judges. It also appoints one of the five members on the National Broadcasting Council (KRRiT), a broadcasting regulator.

Additionally, some political appointments require a majority vote in the Sejm for the nomination and a majority vote in the Senate for the appointment. For instance, the current Commissioner for Human Rights, Adam Bodnar, is a prominent government critic; his term ends in 2020. The Senate can now force the Sejm to nominate a compromise candidate for this office, since both chambers must have majority support for the nominee.

Finally, by winning the Senate majority, the opposition will be able to appoint a Senate president who sets the chamber’s agenda — which can include questioning representatives of public institutions in public hearings.

What happens next?

The president must call the first session of the new Parliament within 30 days after the election. However, for the first time since 1989, the previous Parliament met after the election on Tuesday and Wednesday this week. This had been denounced by the opposition before the election over concerns that PiS could use it to make changes limiting the powers of the new majority in case of a loss.

PiS may also try to encourage some opposition senators to switch parties, as it did successfully in the Silesian regional assembly after last year’s regional elections.

Mary Stegmaier (@MaryStegmaier) is the interim vice provost for international programs and an associate professor in the Truman School of Public Affairs at the University of Missouri. Her research focuses on voting behavior, elections, forecasting and political representation.

Kamil Marcinkiewicz (@kamil_marc) is a lecturer of political science and research methods at the University of Hamburg in Germany. His research focuses on voting behavior, elections and legislative politics.