Genesis Energy has been given the green light to build what could be the biggest windfarm in New Zealand at Castle Hill, east of Eketahuna.
On Wednesday, the Environment Court approved the controversial $1.6 billion project after months of debate between Genesis Energy and local community groups.
The consent for the windfarm, which will be north of Masterton and east of Eketahuna, covering 30,000 hectares, allows for 286 turbines at 135 metres high.
It could generate enough electricity for up to 370,000 households.
Genesis has given no details of when construction would happen but must start building within 10 years. The construction itself has a 10-year window under the consent.
In 2011, resource consents were lodged with the Masterton and Tararua district councils and the Greater Wellington and Horizons regional councils.
After a local hearing held by independent commissioners last year, Genesis was given the go-ahead to build 267 turbines up to 135m high, with 50 of the turbines no taller than 115m.
The decision was then challenged in the Environment Court with appeals from four parties, including Genesis itself.
The company appealed over the decreased number and height of the turbines, saying it unreasonably limited the flexibility of the project.
Appeals were also made by the Castle Hill Wind Farm Community Action Group, Alfredton School and Alfredton farmer Brent Weston.
Chairman of the action group David Nelson said the windfarm would have a devastating effect on the health and safety of the community.
The school said there would be adverse effects on the operation of the school bus, the safety of schoolchildren and the community during the project's proposed 10-year construction period.
All appeals were resolved by mutual agreement.
Tararua Mayor Roly Ellis said he was pleased with the outcome, and the future jobs and financial benefits for Tararua.
"I think it's good for distribution of electricity all around the North Island."
He said the majority of people in the district were in favour of the windfarm.
"Generally, people all over the district realised the country has to go forward.
"I'm glad mediation has worked."
Masterton Mayor Garry Daniell said it was "great news" for the district and for Tararua as well.
"There's going to be a lot of work in the regions for some years to come," he said.
"The question of upgrading roads, bridges, is something we have to come to grips with."
With one of the wind turbine components weighing 65 tonnes, the delivery of materials would require "special" routes. In terms of opposition, he said it was often a case of those who were getting a turbine on their property were for it, and those who were not were against it.
"There's considerable revenue for landowners, a constant source of income."
Genesis Energy chief executive Albert Brantley said having sustainable energy options of this scale was essential for the future of New Zealand's energy generation.
Richard Gordon, Genesis public affairs manager, said construction could be around 10 years away, depending on electricity demands.
"The reality is the NZ electricity market is pretty well served, this is a long-term option.
"These consents are about being prepared for the future."
Last year, Peter Wimsett, the manager for strategy and development at the Tararua District Council, said there were other benefits to the region's ratepayers.
"During the construction phase there is likely to be road widening, possible strengthening and bridges."
Communication systems might be improved.
"If you get infrastructure into the hinterland, then locals are likely to benefit from that too," he said.