IT WAS certainly a win but the man dubbed ''J'' had little time to enjoy it. With only three months to live he gained his release from a psychiatric hospital after being held there against his will, partly because his wife and doctors believed he was spending his life insurance payout too freely.

He was spending his $700,000 payment - received after being diagnosed with terminal pancreatic cancer - on charities, airfares and gifts to friends and women, his wife and friends reported.

Staff at Prince of Wales Hospital denied J full access to the lawyers he hired to fight his detention. The NSW Supreme Court found the Mental Health Tribunal had delivered a ''manifestly inadequate'' judgment on J's attempt to appeal against his treatment.

David Begg, of David Begg and Associates, which acted for the man, said the situation should not have occurred. "It's clear that at various times he wanted to see a lawyer … There shouldn't be any barriers in place to that.''

The man was detained in part on reports by his third wife of his spending.