WELLINGTON, New Zealand (AP) -- A New Zealand government minister who gained brief international fame last year for a lively speech in support of gay marriage has resigned his portfolios after inappropriately contacting police about their investigation into an associate.

Maurice Williamson resigned Thursday as minister in charge of building and construction, customs, land information and statistics.

The New Zealand Herald newspaper reported Williamson contacted police about their investigation into businessman Liu Donghua, who had been arrested on domestic violence charges. Prime Minister John Key on Thursday called Williamson's actions a "significant error of judgment."

In a speech last year that went viral on the Internet, Williamson mocked religious opponents by saying he'd seen a sign: a "big gay rainbow" over his electorate. Parliament soon after voted in favor of legalizing same-sex marriage.