The update ensures nearly all wood and paper bought by Chinese companies has preferential access for the next decade.

New Zealand said on Monday that it has concluded a deal to upgrade its free trade agreement with China – a deal that has been under negotiations for years.

The upgraded agreement will make exporting to China easier and reduce compliance costs for New Zealand exports by millions of dollars each year, the trade ministry said in a statement.

The upgrade would ensure nearly all New Zealand’s wood and paper trade to China will have preferential access over the next ten years, it said.

“This ensures our upgraded free trade agreement will remain the best that China has with any country,” Prime Minister Jacinda Ardern said in a statement issued after her bilateral meeting with China’s Premier, Li Keqiang, in Thailand at the East Asia Summit.

The upgrade also secures a commitment from Beijing to promote environmental protections and ensure that environmental standards are not used for trade protectionist purposes, the statement added.

New Zealand was the first developed country to sign a free trade agreement with China in 2008. It has been working with Beijing to upgrade the agreement for the last three years.

China is New Zealand’s largest trading partner, with annual two-way trade recently exceeding $32 billion New Zealand dollars ($21bn).

The relationship hit a stumbling block under Ardern’s coalition government after it criticised China’s lending to the Pacific, and rejected a bid to allow Chinese technology giant Huawei to take part in the country’s planned 5G network.

Ties, however, improved after Ardern’s trip to Beijing earlier this year.

New Zealand said existing conditions have been maintained on dairy trade in this upgrade, with all safeguard tariffs to be eliminated within just over two years for most products and four years for milk powder.

The next steps include legal verification of the draft text, with the signing and release of the text expected in early 2020, the statement said.