Prince’s family reached an agreement on the division of his $156 million inheritance after a six-year legal battle, after the singer died without a will, writes The Guardian, citing news.ro.

PrincePhoto: Facebook

The star died at the age of 57 in April 2016 from a fentanyl overdose at his home in Paisley Park, near Minneapolis. With no surviving wife or children, Prince’s fortune went to his six half-siblings, who could not agree on a distribution plan and often ended up in court.

The three heirs sold their shares to a company called Primary Wave, which bought their rights to Prince’s extensive catalog of songs last August. The other three kept their shares and appointed the prince’s long-time adviser Londell McMillan and Charles Spicer to run them.

In January, the heirs settled on a $156 million valuation of the estate with the Internal Revenue Service and Comerica Bank, the estate’s administrator.

On Monday, a Minnesota judge signed off on a settlement that divides $6 million in cash, music rights and other assets between the three heirs, their families, advisers and Primary Wave.

In a statement obtained by Billboard, a representative for Primary Wave said the company is “extremely pleased that the process regarding Prince’s legacy is complete.”

During the trial, there were posthumous or archival releases by Prince with various partners, including Welcome 2 America and the 1999 reissues of “Purple Rain” and “Sign o’ the Times.”