Updated

A New Zealand politician suspected of leaking a report on the country's spy agency has stepped down from his ministerial duties.

Peter Dunne on Friday said he didn't leak the report to a journalist but had made errors of judgment nevertheless. He resigned as revenue minister but said he'd continue as a member of Parliament.

His resignation came after an inquiry into the leak found that Dunne had exchanged 86 emails with Fairfax Media reporter Andrea Vance in the two weeks before Vance published a scoop on the report. Dunne refused to turn over all the emails to the inquiry.

The report concluded the Government Communications Security Bureau unlawfully spied on up to 88 residents.

Prior to the leak, Prime Minister John Key had promised to publicly release the report.