Inland Revenue and four major trading banks have settled a long-running tax dispute.
Earlier this year Westpac was ruled to have been avoiding tax worth more than $960 million. BNZ was also found to have been avoiding tax worth $416 million.
IRD says those two banks - along with the ASB and ANZ National - have now agreed to settle the tax cases by accepting liability for a combined sum that exceeds $2.2 billion.
Commissioner of Inland Revenue Robert Russell says the decision to pursue the cases has been shown to be absolutely correct, and has returned a very good result for New Zealand taxpayers.
The deal is described as the largest commercial settlement in New Zealand history.
Earlier this year, Westpac was found to have avoided payment of tax worth more than $960 million. Under the settlement it will pay about $865 million.
The BNZ was also found to have avoided tax and says it has paid $658 million which is 80% of the full amount of tax and interest.
ASB says it will pay $264 million and ANZ National nearly $414 million.
The payments will end any legal action.