A New Zealand lawmaker accused of making secret recordings of a staff member and then lying about what he did says he will quit when his term expires in September.

Todd Barclay announced Wednesday he won't run in the upcoming election. He said he didn't want the issues that were important to his district and country to be overshadowed by what he described as an employment dispute.

The announcement came a day after Prime Minister Bill English released a statement he made to police last year in which he said Barclay told him he'd left a recording device running in his office and captured criticism from a staffer.

English's actions were prompted by an investigation by the Newsroom website. The Prime Minister continues to face questions about why he didn't act sooner or more decisively to sanction Barclay.

Under New Zealand law, it is illegal to secretly record other people's conversations.

Police investigated Barclay, but the conservative lawmaker refused an interview and police said they closed the case due to insufficient evidence.

English said he had taken steps to address the matter by reporting it to district officials and the police. He said he hopes the government can get back to running the country following Barclay's announcement.

"He's made, I think, a very difficult decision for a young politician, but it's the right one," English said.

He said Barclay made a statement about the issue on Tuesday which he'd later acknowledged was untrue.

Initially on Tuesday, Barclay said he was aware of the secret taping allegations but "totally refute them." But after English released his police statement, Barclay backtracked. He said he accepted English's versions of events and was "sorry if any of the answers I gave this morning were misleading."

In his resignation statement, Barclay said getting elected was "the proudest moment of my life" but that it was in the best interests of the government for him to leave.

English will be hoping the resignation doesn't sour voters on the National Party, which has won the past three elections under former leader John Key. Recent polls indicate the National Party remains the most popular party and English the preferred prime minister ahead of September's nationwide elections.