The Problem Gambling Foundation has won a challenge against the Ministry of Health, which wanted to cut its funding.
The foundation sought a judicial review of the tender process in which it lost almost all of its funding.
Almost 70 per cent of its funding went to the Salvation Army in March last year, following a Ministry of Health tender process in which 32 bids were made.
Today, a High Court judge has set that decision aside.
Problem Gambling Foundation chief executive Graeme Ramsey said the victory gave the organisation what it wanted - a fair process.
"It's hard for a small NGO like us to take on the Ministry of Health and say they've got it wrong. All we were ever after was a fair process that delivered the right result for problem gambling."
He said the decision resolved a long period of uncertainty for the clients of the foundation and for those working for it.
"It has reinforced that the process they went through was not the best result for New Zealand."
Mr Ramsey said the judgment raised questions about the decision-making by the ministry. "The judgment does raise a lot more questions."
Labour's associate health spokesman David Clark said the court ruling proved "just how inept the Ministry of Health's contracting processes are".
"The axing of the foundation was an unmitigated disaster. The ministry is a shambles and the responsibility for that must be laid at the feet of the minister.
"Not only is the department in chaos, but this Government has actively moved to increase gambling fully aware of the harm it does to our communities and families.
"We know the SkyCity deal alone will create hundreds more problem gamblers and around 8000 people will be impacted as a result."
- Additional reporting from Newstalk ZB