Poland violated EU law by ordering large-scale logging in one of Europe's oldest woodlands, the Bialowieza forest, the European Court of Justice has ruled.

Bialowieza forest has been designated a Unesco World Heritage site and is home to Europe's largest herd of nearly extinct bison.

But Poland argued its decision to order a three-fold increase in logging was necessary to combat beetle infestation.

Poland says it will respect the ruling.

The court's decision is a defeat for the country's conservative-led government.

The ECJ said Poland had "failed to fulfil its obligations" in directives covering the habitats of animals and birds.

While the whole of the Bialowieza forest in Poland is protected under EU directives, only 17% of that area has been designated a national park where no logging takes place.

The court used particularly strong language to criticise Poland's argument that it was responding to a "constant spread" of infestation of spruce bark beetles. It said the infestation "was not identified in the slightest" as a threat in the government's 2015 management plan. The nationalist Law and Justice party (PiS) took office in late 2015.

The ECJ ruling was hailed by environmental activists. The group ClientEarth said the decision was for now only on paper and called for the government in Warsaw to scrap its original approval of logging.

The logging case is one of several key issues that have clouded relations between Poland's Law and Justice government and the EU.

Last December the EU launched unprecedented disciplinary measures against Warsaw over judicial reforms that "interfere significantly" in the judiciary.

Among the reforms was a bid to give the justice minister the power to remove court presidents from the communist era.

Poland's government has since sought to reach a compromise ahead of talks on the EU's long-term budget. Parliament in Warsaw voted to back changes to the reforms last week, removing the justice minister's power to get rid of the judges without seeking consultation.