A river in New Zealand has become the first landmark in the world to be recognised as a living entity, after a 170-year battle.

The Whanganui River, which flows 145 kilometres from the central North Island to the sea, was given legal personhood by the country's parliament on Wednesday.

The river is a sacred and revered waterway to New Zealand's Maori Iwi people and its interests will now be represented by an Indigenous group.

Map Whanganui River

It will be jointly represented by a member appointed by the Maori community, and one appointed by the government.

The country's Minister for Treaty of Waitangi Negotiations Christopher Finlayson said the passing of the Te Awa Tupua Bill was a battle hard fought for.

"Whanganui Iwi has fought for recognition of its relationship with the Whanganui River since the 1870s," he said.

"Today brings the longest running litigation in New Zealand's history to an end."

Negotiations between New Zealand's government and Whanganui Iwi formally began in 2009.

The Whanganui River Deed of Settlement was signed in 2014 and legislation was introduced in 2016.

Mr Finlayson said the approach to granting a river legal personality was unique.

"It responds to the view of the Iwi of the Whanganui River which has long recognised Te Awa Tupua through its traditions, customs and practise.

"This legislation recognises the deep spiritual connection between the Whanganui Iwi and its ancestral river and creates a strong platform for the future of Whanganui River."

Gerrard Albert, a spokesperson for the local Maori people, told the Telegraph the community had long been concerned about the government's impact on the "health and wellbeing" of the river.

"We have always believed that the Whanganui River is an indivisible and living whole — Te Awa Tupua — which includes all its physical and spiritual elements from the mountains of the central North Island to the sea," he said.