WARSAW, Poland — The European Union’s top advocate said Tuesday that Poland has broken environmental laws with its massive logging of trees in one of Europe’s last pristine forests.

The opinion by Advocate General Yves Bot could bring a ruling from the EU’s Court of Justice against Poland’s actions in the Bialowieza Forest a step nearer.

According to the opinion, the court “should rule that Poland has failed to fulfil its obligations” under the EU’s Natura 2000 directives that protect natural sites of special importance.

Observers say the opinions from the advocate general are often adopted in final rulings.

Poland’s new environment minister, Henryk Kowalczyk, said the government will abide by any ruling and stressed that all actions in the precious forest have been taken to “preserve it in the best condition for the present and future generations.”

In 2016, the previous minister, Jan Szyszko, authorized widespread logging in the forest, saying he was fighting an outbreak of bark beetle infestation that left dozens of hectares (hundreds of acres) of dead spruce trees. Szyszko was replaced in January during a government shuffle intended to improve Warsaw’s dialogue with Brussels.

Environmentalists and EU experts say the large-scale felling of trees destroys rare animal habitats and plants, in violation of regulations. They held protests and brought the case before the court last year.

They welcomed Bot’s recommendations.

“The Polish government wants to sacrifice centuries-old trees for short-term gain,” said Ska Keller, co-president of the Greens/European Free Alliance group in the European Parliament.

“We must protect Poland and Europe’s green lungs and support the many conservationists and scientists who have protested against deforestation in this unique World Heritage Site.”

Bot said that Bialowieza’s protected site is “one of the best preserved natural forests in Europe, characterized by large quantities of ancient trees, some of which are centuries old, and dead wood.”

The forest covers tens of thousands of hectares (hundreds of thousands of acres) in Poland and Belarus, and is home to hundreds of animal and plant species, including bison, lynx, moss and lichens.

Its younger parts have been traditionally used to produce timber, a source of income for residents.