WELLINGTON, New Zealand -- New Zealand's transport minister will no longer oversee aviation safety after he violated rules by making a cellphone call on a plane.

Phil Twyford told reporters Thursday he called a staffer on May 17 while on a flight from Wellington to Auckland. He said the plane was not airborne, but the doors had been closed in preparation for takeoff. Cellphone calls are banned after the doors are closed.

He said he apologized unreservedly to Prime Minister Jacinda Ardern for his mistake. She declined his offer to resign but chose to transfer his oversight of the Civil Aviation Authority to another minister, he said.

Ardern said that if the authority decided to investigate Twyford it would be inappropriate for him to remain in charge. Twyford said he had informed the authority about what he had done.

Get Breaking News Delivered to Your Inbox

The incident happened on the day the government released its annual budget, which is typically one of the busiest days of the year for ministers. It came to light a week later, after an opposition lawmaker submitted a written question about it.

"I made a mistake, and I clearly wasn't thinking straight at the time. And I recognize that," Twyford said. "It was unacceptable."

He said the call lasted about a minute and he hadn't given it another thought until receiving the written question.

Rules surrounding mobile devices have been relaxed in New Zealand over recent years. Air New Zealand now allows customers to use electronic devices during all stages of flight, so long as they are switched to flight mode. But passengers are still banned from making cellphone calls or sending text messages during flight.

Associate Transport Minister Julie Anne Genter will take over Twyford's role overseeing the aviation authority.