Nikki Kaye recalls Sir John Key telling her she's 'not f***ing going anywhere' when trying to resign after cancer diagnosis

National MP Nikki Kaye recalled the time Sir John Key told her she's "not f***ing going anywhere" when she attempted to resign after a cancer diagnosis in 2016.

Sir John was watching Ms Kaye's valedictory speech in Parliament this evening when she told the story.

"In 2016 I was diagnosed with breast cancer. My world broke, I tried to resign and the only reason I was only able to become Minister of Education was that John Key, as I cried my eyes out, said, 'You're not f***ing going anywhere'.

"I became the Minster of Education three months prior to the election period," she said.

Ms Kaye went on to say, "I have been proud to have been a public servant of New Zealand. I love our country and I hope to continue to contribute in the future."

After her speech, colleagues from both sides of the political aisle gave her a standing ovation and went over to wish her the best.

Ms Kaye first won her Central Auckland electorate seat for National back in 2008.

She recently had a brief stint as National's deputy leader before Todd Muller stepped down as leader.

Ms Kaye will finish her political career after the election in September and plans to spend more time on her beloved Great Barrier Island and be a "hippie for a while."