Immigration New Zealand says legal reasons prevent it from saying why it reversed an earlier decision to deny a masters student a visa.
Shyamal Patel and her husband Jitnesh are celebrating after they were granted two-year work visas on Christmas Eve.
Mrs Patel said she had given up hope of staying in New Zealand after her application for a post-study visa was rejected.
At the time, an official told RNZ the department had reviewed Ms Patel's application four times but it fell short.
However, after her story was published, she was contacted by top firm Chapman Tripp, which offered to represent her pro bono in a judicial review proceeding.
The manager of Immigration New Zealand, Michael Carley, confirmed Mrs Patel and her husband had accepted two-year work visas and the court action would now be discontinued.
"For legal reasons INZ can make no further comment," Mr Carley said in a statement.
In the 2017/18 financial year, 12,217 people applied for employer-assisted post-study visas, of which 1,468 were declined.
Another 16,631 applied for "open" post-study visas (meaning they would not be tied to one employer) of which 291 were declined.