One of Tasmania's longest-serving prisoners, Jamie Gregory McCrossen, will be released before the end of the year after his dangerous criminal declaration was overturned.

Justice Helen Wood overturned the dangerous criminal declaration that was made over McCrossen in 1991.

In delivering her judgement, Justice Wood said she was satisfied the declaration was no longer warranted for the protection of the public.

McCrossen was jailed for assault and wounding in 1990, aged 18, after he held up an antique shop with an antique pistol.

He was declared a dangerous criminal the following year after sending death threats to his victim.

The state's sentencing act enables a judge to declare an offender a dangerous criminal rendering them ineligible for release until the declaration is discharged.

Without the order he would have been released on July 17, 1992.

After the judgement was handed down on Thursday, McCrossen thanked his lawyer Kate Cuthbertson.

Leaving the court Ms Cuthbertson told reporters "we're just very happy".

In her concluding remarks Justice Wood noted that the High Court had called indefinite detention stark and extraordinary punishment, and "the applicant's case exemplifies that description".

"He has spent 26 years in custody because of the declaration. The length of time is Dickensian," she said.

Justice Wood pointed out that the legislation does not allow for a periodic review of dangerous criminal declarations or oblige the state to justify continuing detention.

"While privileged today to make this order, I am troubled that tomorrow I may be confronted with a case that, given the current legislative framework, may see history repeated.

McCrossen first applied to have the order overturned in 2013, but it was rejected in 2016, with Justice Shan Tennent noting that he had become "in effect institutionalised."

He has been diagnosed with chronic post-traumatic stress disorder, and was moved into the Wilfred Lopes secure mental health unit last December, away from the general prison population.

Justice Wood's judgement said McCrossen would need years of stable treatment and therapy at the Wilfred Lopes Centre as a civil patient, but ultimately may be able to live in a supported residential environment suitable for someone with his needs and condition such as Millbrook Rise.

He is due to be released on December 14.