Radosław Sikorski resigned as speaker of Parliament on Wednesday | EPA A Polish ‘Game of Tapes’ Radek Sikorski is the most prominent victim of a government shakeup in the wake of a wire-tapping scandal and electoral troubles.

Poland’s Prime Minister Ewa Kopacz upended her government on Wednesday night, looking to seize the political initiative after her party lost the country’s presidency last month and headed into a parliamentary election campaign a fading force.

Kopacz pushed out the most prominent figures associated with an embarrassing bugging scandal that has tainted her administration. Senior politicians had been recorded at a fancy Warsaw restaurant, and their profanity-laced conversations were splashed in the press in recent months.

The highest-profile victim was Radek Sikorski, the speaker of parliament and former foreign and defense minister, who resigned Wednesday. “I had a difficult conversation with Radosław Sikorski. He said he would resign his post,” Kopacz said.

Also out is Jacek Rostowski, the former finance minister who was one of Kopacz’s top economic policy advisers.

The premier also fired the health minister, Bartosz Arłukowicz, Treasury Minister Włodzimierz Karpiński, Sports Minister Andrzej Biernat, three deputy ministers and Jacek Cichocki, the head of the prime minister’s office and chief of a committee in charge of secret services, which did a poor job of protecting officials from being bugged.

Kopacz said she wanted to remove the country’s chief prosecutor who is conducting the investigation into the wiretapping scandal, which she said was handled ineptly. The prosecutor can only be fired by a two-thirds vote of parliament.

“There is an election campaign on,” Kopacz said at a news conference. “As premier I will not allow it to become a game of tapes.”

The recordings were made by a group of waiters, who have since been charged with making illegal tapes. The politicians were caught on tape at Sowa i Przyjaciele, an upmarket eatery popular with the Warsaw elite. Initially most of the tapes were leaked to the Wprost newsweekly.

Disgust at the recordings helped turn public opinion against Kopacz’s centrist Civic Platform party (PO), which has formed the government since 2007. They were a factor in the unexpected defeat of Bronisław Komorowski in presidential elections last month by Andrzej Duda of the right-wing Law and Justice party (PiS).

Civic Platform’s popularity has kept falling since then. A new poll by TNS Polska out on Wednesday shows Law and Justice at 32 percent, Civic Platform at 24 percent and an inchoate protest political movement forming around former rock star Paweł Kukiz at 20 percent.

PO has been in a panic ever since Komorowski’s loss. “Some well-respected people aren’t helping our image. They are seen as arrogant,” a senior adviser to Kopacz recently complained to POLITICO. “We want to add some new faces to the well-known ones.”

The latest to appear on the tapes is Elżbieta Bieńkowska, the internal market commissioner, who was recorded when she was still deputy prime minister in charge of infrastructure. At a (taxpayer financed) dinner with Poland’s anti-corruption chief, Bieńkowska commented that only an “idiot” would work for less than 6,000 zlotys a month (about €1,460), or about twice the average Polish net salary. The recordings were published during the presidential election and cemented the ruling party’s reputation as being out of touch with ordinary Poles.

Earlier recordings also showed the seamy underside of what was an internationally respected government.

“I had a difficult conversation with Radosław Sikorski. He said he would resign his post,” Kopacz said.

During their dinner, Rostowski and Sikorski, both English-educated anglophiles, dug into octopus and bad-mouthed British Prime Minister David Cameron, whom Sikorski first met at Oxford in their college days. At another dinner Marek Belka, the central bank governor (who cannot be fired by the prime minister), talked to former interior minister Bartłomiej Sienkiewicz (who quit months ago) about changing monetary policy if Civic Platform started to sag in opinion polls.

The scandal was exploding just as Donald Tusk, the former prime minister, waged a successful campaign to become president of the European Council. He left for Brussels late last year, leaving his replacement Kopacz to handle the fallout.

For months Kopacz did nothing, and the scandal seemed to blow over — until Duda’s long-shot presidential campaign caught fire.

“Recently, PO voters have had a lot of difficult moments,” Kopacz said during her news conference. “Those who listened to the recordings are owned an apology.”

Michał Szułdrzyński in Warsaw contributed to this article.