Updated

New Zealand's Justice Minister Judith Collins has resigned from her portfolios amid a scandal about her ties to a controversial blogger.

The resignation Saturday comes just three weeks before New Zealand's general election and could impact the chances of Prime Minister John Key returning for a third term in office. Opposition parties will see the move as victory while Key will hope it will bring closure to the scandal.

New Zealand freelance investigative journalist and liberal activist Nicky Hager first detailed the extent of Collins engagement with blogger Cameron Slater in a book he released this month "Dirty Politics," which was based on hacked emails from Slater's Whale Oil blog that Hager had obtained.

The blog takes a no-holds-barred approach to promoting Slater's conservative views and mercilessly attacking opponents.