New Zealand's government has agreed to pay a record amount to a man who spent more than 20 years in prison for a rape and murder he did not commit.

The government announced Wednesday that it would pay Teina Pora 2.5 million New Zealand dollars ($1.8 million) and also issued him a formal apology. The compensation is the highest ever paid by the South Pacific nation for a wrongful conviction.

Pora was convicted in 1994 of raping and murdering Susan Burdett, an Auckland woman. After agreeing to hear an appeal from Pora, Britain's Privy Council in 2015 quashed all his convictions.

The British court was historically New Zealand's final court of appeal, although it has been superseded by a domestic Supreme Court for cases after 2003.