A controversial incinerator in Mallusk, County Antrim, has been blocked by the High Court.
Planning permission for the £240m facility was approved by a Department for Infrastructure civil servant in September 2017.
It caused controversy as politicians argued it was not his decision to take.
Plans for the incinerator, which was proposed by waste management firm Arc21, received more than 4,000 letters of objection.
The High Court has now ruled the senior civil servant, Peter May, had no power to approve the planning application.
Mrs Justice Keegan, in a judicial review ruling, said despite the absence of a working assembly and minister the decision still should be made by a minister and not civil servants.
Residents and politicians fought against the original decision and have welcomed the ruling.
A spokesperson for Arc21 said it was disappointed with the ruling and that the waste company "will take time to consider the judgement in detail and consult with our stakeholders".
The Becon Consortium, the would-be developer of the project, released a statement saying it was disappointed by the outcome of the judicial review.
It added that the ruling was a setback and that it remained committed to delivering the project.
"We note that the decision not to uphold this decision does not change the material facts at the heart of the planning decision, the project's compliance with regional waste policy or indeed remove the strategic need for such infrastructure here in Northern Ireland in the future," a spokesman said.
"Instead, the judge's decision is entirely based on procedural matters in relation to the ability of the department to make a decision in the absence of a minister in post."
NoArc21, the community group opposed to the incinerator, said it was delighted with the decision.
Colin Buick, chairperson of NoArc21, said: "We hope that today's judgement will act as a wake-up call to DFI.
"Now is an opportune time for the department to take stock and completely review its waste management strategy.
"There needs to be a rigorous assessment of what facilities are needed going forward - especially if they are to be paid for out of rate-payers pockets."
Planning for the incinerator was initially refused on the grounds it could pose a potential risk to health and discourage recycling.
But an appeal to the Planning Appeals Commission established that none of the statutory health agencies had opposed it, and it had the backing of waste experts in the Department of Agriculture, Environment and Rural Affairs.
It was later approved by the Department for Infrastructure, which now has responsibility for strategic planning.
The judicial review to the plan was taken by a resident.
The High Court was told that the decision was inconsistent with how civil servants had acted in another high-profile case.
A barrister representing the resident quoted from a letter written by the head of the Civil Service in Northern Ireland, David Sterling, on 14 December 2017.
In the letter, Mr Sterling explained that civil servants could not approve compensation for victims of historical institutional abuse without ministerial approval.
The barrister said this demonstrated "a marked difference" to how the Civil Service had acted, in granting planning approval to Arc21, in the absence of "ministerial direction".
He said this amounted to "supplanting democratic control" in what he compared to a "Sir Humphrey" scenario - referring to a character from the TV comedy show Yes Minister.
But the barrister representing the Department for Infrastructure said a failure to allow officials to make decisions, since the collapse of the Northern Ireland Executive last year, would have resulted in "a shutdown of government".
A Department for Infrastructure spokeswoman said: "The department is considering today's judgement."