The court cancelled a special decree passed three years ago which ruled that terminally ill criminals could not be kept in jail. Judges will now have to use discretion to decide whether or not to prosecute Aids patients for their misdeeds.
The 1992 decree was supposed to be a humanitarian gesture, but ended up exposing the whole Italian legal system to ridicule when the Turin gang - all heroin addicts infected by shared needles - earned notoriety over the summer.
They would repeatedly enter small banks in the Turin area, threaten staff and customers with a knife and walk out moments later with their pockets and coats stuffed with cash. The police got so used to catching them and then releasing them again that they ended up on first-name terms.
One of the gang leaders is now in hospital recovering from a lung infection, while the other two are living at home. They say their robberies were partly intended as a protest against the lack of facilities for people in their position. Italy offers almost no specialised medical care for Aids patients.
Italy's asylums and mental hospitals were closed down in one fell swoop in the late 1970s in a rushed attempt to end the inhumane conditions there, and nothing has taken their place. Social workers and magistrates agree that jail is not a satisfactory alternative, since conditions are often crude and unsanitary.
They have called for a rapid infusion of state cash to provide hospices for Aids sufferers.
The constitutional court ruling was quickly denounced by the bandits, who said that they would have no chance of receiving appropriate treatment if they were sent to jail. "You'll see, plenty of people in my condition will commit suicide rather than go back to prison," said Sergio Magnis, 29, from his hospital bed.
"How can they think of putting someone like me in a cell with other prisoners? Here everyone wears gloves and a face mask. Will they give the same things to the other inmates, or will they let them get infected and die?"
The president of the constitutional court, Vincenzo Caianiello, acknowledged that the problem of inadequate treatment remained, but insisted it was a matter for the prison administration.