WARSAW, Poland (AP) — Poland’s powerful conservative ruling party leader, Jaroslaw Kaczynski, rejoined the government on Wednesday as the only deputy prime minister in the Cabinet, a move that gives him an enhanced position as the country heads toward a general election this fall.

To make way for Kaczynski, four other deputy prime ministers resigned from their positions.

Kaczynski’s party, the right-wing populist Law and Justice, appears to be losing some of its momentum with elections four months away. Though it remains the country’s most popular party, opinion polls suggest some of its campaign pledges are failing to gain traction with voters. Meanwhile the main opposition party has been energized after organizing a massive anti-government protest earlier this month.

President Andrzej Duda appointed Kaczynski to the post of deputy prime minister in a ceremony at the presidential palace in Warsaw.

Duda, an ally of Law and Justice, thanked Kaczynski for his return to government.

Among those making way for Kaczynski are Defense Minister Mariusz Blaszczak and Culture Minister Piotr Glinski. They keep their portfolios as the heads of their ministries.

As the head of Law and Justice, which has governed Poland since 2015, Kaczynski is the de facto leader of the country, shaping most of the government’s policies and appointments.

He has previously served as deputy prime minister with a focus on security issues but announced his resignation from that position exactly a year ago.

His return to the Cabinet with a strengthened role comes as the party is facing a difficult election campaign. A date for the election has not been set, but it is expected to be held in October.

Recent opinion polls show that Law and Justice remains the most popular party in the country, but if elections were held now, it would not be expected to win enough votes to gain a majority in parliament.

Kaczynski’s reappointment to the government comes just days after the party’s campaign chief resigned and was replaced by one of Kaczynski’s closest allies, Joachim Brudzinski, a member of the European Parliament.