A controversial Polish court ruling that imposes a near-total ban on abortion will come into force on Wednesday, the country's right-wing government said, in an announcement that brought thousands into the streets.

The move means that all abortions in Poland will be banned except in cases of rape and incest and when the mother's life or health are considered to be at risk.

"The ruling will be published today in the Journal of Laws," the government said on Twitter.

Protesters in the capital Warsaw lit red flares, waved gay rainbow flags and brandished placards reading "This Means War" and "Free Choice, Not Terror".

Many also held up the red lightning symbol used by pro-choice activists as they brought traffic to a halt.

There were similar protests across Poland, defying coronavirus restrictions forbidding mass gatherings.

'Hell for the government'

The country was rocked by massive demonstrations when the Constitutional Court verdict was first issued in October, following a request by members of the governing ultra-Catholic Law and Justice party (PiS).

The October 22 ruling said abortions in cases of foetal abnormalities were "incompatible" with the constitution.

"Express your anger today as you see fit," Marta Lempart, a leading protest organiser from the organisation Women's Strike, told a hastily-arranged press conference after the government announcement.

"We are calling on everyone to go into the streets," she said, adding that publication of the ruling constituted "a crime".

Klementyna Suchanow, another organiser from Women's Strike, said: "The whole of Poland is mobilising, not just in Warsaw. We are ready!

"When we speak of hell for women, we can also speak of hell for the government. We are going to make this hell for you," she said.

Suchanow and Lempart both wore green headscarves -- the symbol of abortion rights activists in Argentina, which legalised abortion last month in a landmark move.

The protest in Warsaw began outside the Constitutional Court and later made its way to PiS party headquarters.

'You will not win'

Predominantly Catholic Poland already has one of Europe's most restrictive laws on abortion.

There are fewer than 2,000 legal abortions every year and women's groups estimate that an additional 200,000 women abort either illegally or abroad.

Borys Budka, head of the opposition Civic Platform, said the publication of the ruling was a "provocation".

Wanda Nowicka of the Left party tweeted: "You have not yet won this war against women and you will not win."

The government had delayed publishing the ruling after nationwide demonstrations held in defiance of coronavirus restrictions banning rallies.

The protests sparked by the abortion ruling, many of them led by teens, soon became an expression of wider anti-government sentiment.

The biggest protests brought together tens of thousands of people in what organisers said was a generational "revolution" against the status quo, including against Poland's Catholic hierarchy.

But polling experts say that a "silent majority" of Poles support the existing abortion legislation and only a small number want wider abortion rights.

The government has defended the verdict, saying it will halt "eugenic abortions", referring to the termination of foetuses diagnosed with Down's Syndrome, but human rights groups have said it would force women to carry non-viable pregnancies.