Former All Black Andrew Mehrtens has signed a settlement agreement with a law firm in a bid to avoid bankruptcy.

Saunders Robinson Brown had sought to bankrupt Mehrtens over an undisclosed debt.

At a Christchurch High Court hearing on Thursday, the court heard Mehrtens, 53, signed a settlement agreement minutes before the matter was called.

The firm was yet to sign the document.

Associate Judge Dale Lester adjourned the case until August, when the bankruptcy application was expected to be withdrawn.

Mehrtens was considered one of the most influential first five-eighths in New Zealand rugby history.

He played 70 Tests between 1995 and 2004, scoring 994 points for the All Blacks in all matches.