A mistake by the Foreign Affairs Ministry has cost the taxpayer a quarter of a million dollars.

It came after the ministry twice waved diplomatic immunity for one of its staff so her custody battle could be heard in the American courts.

The high-flying US-based staffer wanted to fight her divorce and custody battle in the courts there.

So, in an unprecedented moved, in May 2015, MFAT waived her diplomatic immunity.

The father wanted the case heard in New Zealand.

Then, MFAT granted a second waiver to keep the case in America, in November 2015, after a policy change that had to be signed off by acting Foreign Minister John Key.

Just a few days later, the Family Court in Wellington ruled the case should be heard in New Zealand. 1NEWS has agreed not to identify the family.

After a legal battle lasting more than a year, MFAT boss Brook Barrington apologised to the father and paid his legal bills, totalling $212,000.

1NEWS also understands the Ministry paid the mother's legal costs - about $50,000.

University of Otago law dean Professor Mark Heneghan was shocked by the Ministry's intervention.

"There is no doubt about it, it has extended the proceedings quite dramatically and that's really awful for the children," he said.

"The jurisdiction naturally did lie in New Zealand and we signed conventions to say that if it is New Zealand children that it should be dealt with by a New Zealand court.

"The law is very clear in this respect.

"There was no need ... no evidence to waive the diplomatic immunity."

Professor Heneghan said it goes against the spirit of New Zealand's Care of the Children Act, and the Hague Convention.

"We signed the Hague Convention which says that when New Zealand children are up for dispute between parents then it should be heard in a New Zealand court."

MFAT officials refused to be interviewed, but said in a statement: "The ministry ... is confident its actions in deciding to waive immunity were lawful and reasonable, and taken in good faith."

A spokeswoman said it has reviewed and amended ministry policies for relationship breakdowns on overseas postings.