It is a gut-wrenching irony that if one of the greatest collective miscarriages of justice had been corrected years ago, the prisoner release crisis would not now be taking place.

The British prison system seems to work with astonishingly thin margins for error – constantly close to capacity and thus prone to collapse without emergency measures. It is again right now, a fact that has necessitated “decisions no minister would ever want to take”, as the new justice secretary Alex Norris puts it, namely the government’s revised early release scheme to tackle overcrowding in prisons.

Yet hundreds, perhaps thousands of precious prison places could have been freed up as long as a decade ago had the authorities ever bothered to end the “IPP scandal”, which even now fails to attract the attention it deserves. This generally under-reported injustice derives from a penal experiment carried out back in the New Labour era, whereby certain types of prisoners would be detained under special “imprisonment for public protection” (IPP) or, in other words, indefinite sentences.

The idea was that although their particular offences might not be especially grave (though some were), the criminal would be kept under lock and key indefinitely, because they were judged to be dangerous to the public, irrespective of the crime. The system, however honourable the original motives were, violated any sense of natural justice. It placed people convicted of, say, petty theft under the same indefinite regime of confinement as the most vicious mass murderers and terrorists with no hope of a date for release.

This was an error admitted by Labour’s new home secretary and has been a running sore in British justice that The Independent has campaigned to reverse.

As The Independent has reported, some of these detentions have grown grotesque and beyond cruel, serving no purpose to anyone. The more egregious cases include Leroy Douglas, 43, who has served almost 20 years without release for street robbery of a mobile phone; Abdullahi Suleman, 42, in jail for 20 years for stealing a laptop; and Shaun Anton Lloyd, 39, who has been returned to prison four times and has served 12 years for two street robberies committed when he was 18.

The IPP system introduced in 2005 was such a failure it was abolished in 2012 – but the legislation, under the usual conventions, did not apply retrospectively. So those caught up in the IPP trap, whether a risk to the outside world or not, were kept inside with no hope of their sentence even being reviewed, a brutal catch-22. These people now number about 2,400.

If only a portion of them can now be safely released, it will still likely be more than enough to ensure that some of the more infamous offenders about to be released can instead be kept in jail, just as the courts ordered and the public demand. This includes two of the men involved in the manslaughter of PC Andrew Harper. There are many others.

It is thus doubly depressing to contemplate the scale and longevity of this record of official neglect, incompetence and injustice. Prisons and prisoners never top the list of “salient” public concerns recorded by the opinion pollsters. There are no votes to be won from enacting prison reform, whereas there is much easy popularity to be gained by being performatively “tough” on crime. Few prison ministers have much of a record to look back on, or even evince much interest in their responsibilities (the late Ann Widdecombe, who insisted on visiting every institution when she was in the role, being a rare exception).

Yet the requests of the prisoners, their lawyers and the pressure groups involved were always modest. They did not want unconditional early release or pardons, but merely for the authorities to find some way to right these potential wrongs by reviewing their sentences. The Human Rights Act of 1998 ought to have been sufficient to ensure this happened straight away; but, for whatever reason, it was always easier to ignore the issue. In that respect, the IPP issue resembles all too strongly other injustices such as the Post Office Horizon scandal, the NHS infected blood scandal, Bloody Sunday, the nuclear test veterans and many others.

Now, because of the overcrowding crisis and public distress about the early releases, a prime minister is having to take a personal look at the IPP scandal – the right result at last, albeit for not quite the right motives. Andy Burnham may be going on his summer holiday, but it is best to assume that Mr Norris and the relevant officials are now, after so much wasted time and so many wasted lives, working at speed to resolve the situation for good.

The idea is for justice to be seen and heard, not for the lock to be turned and the key to be simply thrown away. While this is an encouraging start from this redirected Labour government, we must hope it continues. There is much to be done. We applaud people like Lord Thomas of Cwmgiedd, the former Lord Chief Justice John Thomas, and other campaigners like the Howard League, who have done much to try and right this wrong.

In this scandal especially, there is no escape from the adage that justice delayed is justice denied. These people have been caught in this absurd and inhumane snare for long enough.