The UN's climate change chief Yvo de Boer shows signs of fatigue at a press conference in Copenhagen in December.

The top climate change official at the United Nations is resigning after nearly four years on the job, and five months before a meeting in Mexico to discuss a global pact on greenhouse gas emissions.

Former Dutch civil servant and climate negotiator Yvo de Boer told The Associated Press Thursday he was stepping down July 1 from his post to give UN Secretary General Ban Ki-moon a chance to find his successor ahead of the Mexico conference.

De Boer was widely credited with raising the profile of climate issues but failed to negotiate a binding agreement at the Copenhagen conference in December.

The UN had hoped the Copenhagen talks could come up with an agreement to replace the Kyoto Protocol, which is set to expire in 2012.

Instead, the summit wrapped up with only a partial agreement brokered by U.S. President Barack Obama recognizing that an increase in global temperature should be kept to two degrees — the threshold that UN scientists say is needed to avert serious climate change.

The three-page Copenhagen accord was also not legally binding and had no long-term global targets for emissions cuts.

Copenhagen failure 'a pity'

De Boer said delegates at a late-night plenary session agreed to "take note" of the document, which he said was "a way of recognizing that something is there but not going so far as to directly associate yourself with it."

De Boer said on Thursday the deal was "was very significant" and said it was "a pity" it couldn't go further.

"We were about an inch away from a formal agreement. It was basically in our grasp, but it didn't happen," he said.

De Boer said his decision to resign and take a job as a consultant with global accounting firm KPMG is unrelated to the failure to reach an agreement in Copenhagen.

With files from The Associated Press