Justice Minister Judith Collins has resigned from her post after allegations of her ties to a controversial left-wing blogger instructed to attack political opponents. The "dirty politics" scandal might hurt the chances of New Zealand Prime Minister John Key a few weeks before the election.

The New Zealand election is scheduled in three weeks and Collins' resignation from the government is a blow to Mr Key's re-election bid. According to reports, Opposition parties view the resignation of the justice minister as a "victory." Meanwhile, the prime minister is hoping that the action will put a rest to the political scandal.

The scandal first exploded when Kiwi freelance journalist and liberal activist Nicky Hager published a book about the "dirty politics" of the National party involving Collins' association with blogger Cameron Slater. The book Dirty Politics was released in August with Hager promising explosive and controversial details of email leaks from Slater's Whale Oil blog.

Reports said that the Slater's blog promotes the blogger's views, including vicious attacks against the National party's political opponents. Collins' resignation is allegedly prompted by an email reportedly released to Fairfax Media. The news agency is expected to publish details of the email in the future.

The email that is said to have become the last straw for Collins allegedly contained details of a secret public relations campaign against the SFO and Financial Markets Authority.

In a statement that also served as her resignation, Collins denied any knowledge of the alleged email. Mr Key had accepted her resignation. He said there is new information suggesting Collins' involvement with the blogger in 2011 to attack the credibility of the Serious Fraud Office. The prime minister added that Ms Collins had "strongly denied" any wrongdoing. She has accepted the fact that there were serious allegations again. She thought her decision to resign is the "honourable step" under the circumstances.

Mr Key told reporters that he had not regretted terminating her sooner. He said Collins had no choice but to resign.