Poland’s president announced Tuesday that the country would hold its parliamentary election on Oct. 15, marking the official start of an electoral campaign that has informally been underway for months and is being shaped by Russia’s war against Ukraine.

President Andrzej Duda said in a statement posted on X, formerly known as Twitter, that the elections for the 460-seat lower house of parliament, the Sejm, and for the 100-seat Senate will both take place on that Sunday. Lawmakers will be elected for a four-year term.

The election campaign begins during rising anxieties in Poland over the presence of Russia-linked Wagner mercenaries across the NATO nation’s northeastern border in Belarus, where they have arrived by the thousands since a short-lived mutiny in Russia in June. Tensions have also been growing with ally Ukraine, to the country’s southeast, over grain imports and historical memories of past ethnic conflicts.

Poland’s conservative ruling party, Law and Justice, has been seeking to present itself as strong on national defense given the turmoil across its eastern borders. It has ordered more soldiers to beef up security at the Belarus border and is planning a large military parade on the Aug. 15 Army Day holiday next week to show off new tanks and other military equipment it has been purchasing.

The ruling party — whose leaders have made multiple visits to Kyiv to support the Ukrainian war effort — has also been taking a more confrontational stance with Ukraine of late, as a far-right political group that has been critical of helping Ukraine has been rising in the opinion polls.

Polls show that Law and Justice, which has governed Poland since 2015, is heading toward the election as the most popular party, but is likely to fall short of an outright majority in parliament.

Its main challenger is a liberal-centrist bloc, the Civic Coalition, headed by Donald Tusk, a former Polish prime minister and former president of the European Council. Support for Tusk’s party has grown in past months but mostly at the expense of other opposition parties.

Poland’s geographical position and support for Ukraine and acceptance of large numbers of Ukrainian refugees have attracted two visits since the war started from President Joe Biden.

The praise it won for helping Ukraine has allowed the government to avoid some of the scrutiny it has faced in past years over concerns in the West that its approach to the judiciary, media and LGBTQ+ people and other minorities amounts to democratic backsliding.