WELLINGTON, New Zealand (AP) — New Zealand's health minister resigned Thursday following a series of personal blunders during the coronavirus pandemic.

David Clark had earlier described himself as an “idiot” for breaking the nation's lockdown measures and then last week appeared to blame a beloved health official for border lapses, generating an angry response from the public.

Announcing his resignation, Clark said he'd put all his energy into the job.

“But it has become increasingly clear to me that my continuation in the role is distracting from the government's overall response to COVID-19," he said.

Clark said he intended to remain in the parliament as a lower-ranking lawmaker.

New Zealand's health response has been praised around the world after the country managed to eliminate community transmission of the virus. But Clark himself has been widely ridiculed.

His latest gaffe came last week when he appeared to place the blame for allowing some returning travelers to leave quarantine without being tested with his top official, Director-General of Health Ashley Bloomfield.

Bloomfield, who was standing behind Clark while he spoke, appeared stung by the criticism as he frowned and looked away in a video captured by Newshub and viewed tens of thousands of times. Bloomfield has been the nation's trusted medical expert and public face of the virus response — similar to Dr. Anthony Fauci in the United States.

Many people were angered by Clark's words, and a Twitter campaign dubbed “Blooms for Bloomfield" was launched to buy flowers for Bloomfield. As hundreds of dollars poured in, Bloomfield asked that the money be donated instead to charities, which it was.

It was just the latest in a series of missteps by Clark.

In April, he was stripped of some of his responsibilities after defying the country’s strict lockdown measures. He drove 19 kilometers (12 miles) to the beach to take a walk with his family as the government was asking people to make historic sacrifices by staying at home.

“I’ve been an idiot, and I understand why people will be angry with me,” Clark said at the time. He also earlier acknowledged driving to a park near his home to go mountain biking, also in defiance of the rules.

Prime Minister Jacinda Ardern said at the time she normally would have fired Clark but that the country couldn’t afford massive disruption in its health sector while it was fighting the virus. Instead, she stripped Clark of his role as associate finance minister and demoted him to the bottom of the Cabinet rankings.

But on Thursday, Ardern said she was ready to accept Clark's resignation.

“It’s essential our health leadership has the confidence of the New Zealand public," Ardern said in a statement. “As David has said to me, the needs of the team must come before him as an individual.”

Ardern appointed Education Minister Chris Hipkins to temporarily take over the role.

The move comes less than three months before New Zealanders vote in a general election. Ardern, who leads the liberal Labour Party, saw her popularity soar during the early stages of the virus response, although recent opinion polls indicate the conservative National Party, under new leader Todd Muller, is making inroads into Labour's lead.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.