Polish President Andrzej Duda on Friday vetoed a law that allowed for communist-era officers who served in the military between 1944 and 1990 to be stripped of their rank.

Duda, who is an ally of the country's right-wing government, argued that the bill was not fair as it would not have allowed the demoted officers, many of whom are dead, to defend themselves.

"It was certainly a violation of democratic standards of the state," Duda said.

'Surprised and disappointed'

The ruling Law and Justice party (PiS), which critics have said wants to erase the legacy of post-war, Soviet-dominated communist rule, was "surprised and disappointed," the party spokeswoman Beata Mazurek said.

The proposed law would have allowed for communist-era generals and other high-ranking officers to be stripped of their ranks and reduced to the rank of private.

Duda said the law wrongly applied to all former members of the infamous Military Council of National Salvation (WRON), which was responsible for imposing martial law in Poland in 1981, since not everyone played an active role in the council's decisions.

One of them was Gen. Miroslaw Hermaszewski, Poland's only astronaut. Hermaszewski, who is seen as a national hero, was drafted onto the council in 1981 without his knowledge or consent and discharged from it after two weeks.

Read more: Opinion: Poland attempting damage control on anti-Semitism issues

Watch video 04:46 Share Poland: Attack on freedom of the press Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/2ugMw Poland: Attack on freedom of the press

Eye on re-election

Duda's rejection of the bill may be seen as a bid to improve his chances for re-election in 2020 at a time when the ruling PiS, his ally, is witnessing a drastic drop in popularity.

Support for PiS fell 12 percentage points over one month in a poll published on Thursday.

"One has to remember that a president who wants to win in the first or second round has to win many more votes than the ruling party in a general election," said Rafal Chwedoruk, a political scientist from Warsaw University.

"A recent poll has shown that the vast majority of Poles are against demoting generals. ... The majority of PiS voters from villages and small towns accepted the decision on imposing martial law," Chwedoruk said.

ap/sms (AP, Reuters, AFP)

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.