Some kauri were up to 2,000 years old when they fell.

Swamp kauri must not leave the country unless it has been processed into a product, a court has ruled.

A Supreme Court of New Zealand ruling, released on Friday, found that, to be lawfully exported, a swamp kauri item must be a product in itself and in its final or kitset form and it must be ready either to be used or to be installed into a larger structure.

Swamp kauri timber, also known as ancient kauri, is milled from kauri trees that have been buried and preserved in peat swamps for between 800 and 60,000 years.

SUPPLIED Stacked swamp kauri logs on a Northland property.

Most swamp kauri is found in Northland but some has been found as far south as Waikato.

READ MORE: Swamp kauri export protection case reaches Supreme Court

﻿The Ministry for Primary Industries says on its website that swamp kauri exports are subject to strict rules and a breach of the rules could result in a fine of up to $200,000 on conviction.

Friday's Supreme Court ruling overturns a 2017 High Court ruling that said swamp kauri products should dealt with on a case by case basis.

In 2015 the appellant, Northland Environmental Protection Society (NEPS), claimed swamp kauri was being illegally exported out of New Zealand.

NEPS was primarily concerned about alleged exports of slabs of swamp kauri, said to be table tops, and of lightly carved swamp kauri logs, said to be temple poles.

At issue was whether such items fell within the definition of finished or manufactured indigenous timber product as outlined in the Forests Act 1949.

If such items did fall within the "finished or manufactured" definition they can be lawfully exported.

NEPS chairperson Fiona Furrell said she was "elated" with the ruling.

The victory marked the end of a nine-year battle costing thousands of dollars and countless hours of work, she said.

The group's lawyers had worked pro bono, she said.

As a result of the ruling, loggers would be less attracted to the prospect of milling swamp kauri because of the added time and money required getting it to export standards, she said.

This would result in a reduction in the destruction of wetlands, she said.

And the ruling did not just apply to kauri - all native timber would need to meet a more stringent criteria before export, she said.

NEPS also maintained that swamp kauri was a protected New Zealand object as defined in the Protected Objects Act 1975, which would put restrictions around export swamp kauri however, this appeal was dismissed

The High Court held the view that the "finished or manufactured" definition required a practical approach with a case by case assessment of a product's appearance and intended use at the time of export.

The court found that, using this approach, a table top without fixed legs could meet the "finished or manufactured" definition.

NEPS' appeal to the Court of Appeal was dismissed.

The Supreme Court allowed the appeal in respect of the Forests Act.

The wording and purpose of the Forests Act made it clear that the definition of finished or manufactured indigenous timber product contained is intended to ensure that value is added to indigenous timber before it is exported, the court ruled.

To be lawfully exported, an item must be a product in itself and in its final or kitset form and it must be ready either to be used or to be installed into a larger structure, the court ruled.

A table top, which was not a product in its own right, could not be exported and logs with surface carving were unlikely to meet the definition, the court ruled.