Samoa's attorney general, Brenda Heather Latu, says the leak of criticism of her office did play a part in her decision to resign after ten years in the post.
Ms Heather Latu says her family's future was the main reason to take the step.
But she says a letter from the Deputy Prime Minister to the Prime Minister questioning the work of her office in a recent case defending an election result should have remained confidential:
"There are some communications within government that are best kept confidential and the confidentiality allows free, frank and fair exchange between officials and ministers and that's the way it should be because ultimately there needs top be an exchange or a debate about issues that have got great public significance."
Samoa's attorney general, Brenda Heather Latu