' />

A messy court battle over the estate of the late Sir Edmund Hillary has been averted after the intervention of Prime Minister John Key's office.

Mr Key said the Hillary family's dispute with Auckland War Memorial had been resolved amicably after his staff mediated a resolution.

Sir Ed's children, Peter and Sarah, had threatened legal action against the museum in a bid to regain control of his diaries, writings and family photographs.

In his will, Sir Ed bequeathed his personal papers to the museum with the proviso that his children would have access to them as they saw fit and control of them for 20 years.

The Hillary family had a bitter public fight with the museum over how Sir Ed's will should be interpreted.

Mr Key said an agreement had been reached after constructive and positive meetings and he believed there would be a good relationship in the future.

"It was important that a solution was able to be arrived at based on trust and goodwill. It respects the wishes of Sir Ed, and his enormous reputation," Mr Key said.

The agreement said that the museum acknowledged the material it held included personal family history and that Sir Ed's children had special rights over the use of the estate.

The Hillary family also acknowledged that the museum had the right of possession and would conduct an inventory of the archive.

The inventory would record documents that Sir Ed clearly did not intend the museum to have and these would be returned.

It would also identify any documents that should be restricted for 20 years unless the Hillary family permitted their use.

There would be a disputes resolution process if the parties did not agree about individual issues.

The family and the museum said in a joint statement that it was regretted how events had unfolded and they wished to restore the once harmonious relationship.

The negotiated outcome was "warmly welcomed" and they wished to thank Mr Key for his intervention and the work of his office.

Sir Ed's son, Peter, told Radio New Zealand it had been a "pretty painful" process and he felt "somewhat indebted" to Mr Key for helping both parties sort it out.

They were now in a position to move ahead.

"I think we have a good agreement," he said.

Auckland Museum Trust Board chairman Dr William Randall said there was never any intention for the board to upset the family.

The agreement today included strong commitment to make things work in the future, he said.

Mr Key said he had little personal involvement in sorting out the dispute, this had been done by the chief executive of his department, Maarten Wevers.

He did not wish to discuss who was to blame for the breakdown in relations.

"That is all behind us," Mr Key said.

The parties had taken a step back and come up with a solution to ensure there was no lasting damage to Sir Ed's name.

"He is truly one of the most remarkable New Zealanders and I thought it was completely the incorrect path for the parties to be heading towards the court."