IN PHILADELPHIA, criminal justice officials are working hard to reduce jail stays in city prisons - diverting suspects to treatment programs, lowering the cost of bail. In all, 10 initiatives have been started, funded in large part by a $3.5 million McArthur Foundation grant.

Most of the efforts are not aimed at convicted criminals, but at suspects who are arrested and cannot meet bail - even at less than $500. The city estimates that 63 percent of those behind bars in Philadelphia are suspects awaiting trial.

An early read is that the program is working. The population in city prisons, which surpassed 8,000 in 2015, was down to 6,600 as of March, and that number was down 12 percentage points from the previous year.

These reforms are part of a national trend, sparked by conservatives and liberals alike, who have decided that the regimen of mandatory sentences and mass incarcerations not only haven't delivered results in fighting crime, but also show disturbing racial disparities. Nationally, African Americans are locked up in state prisons at five times the rate of whites.

Meanwhile in Harrisburg . . .

The state House is swimming against the tide. Last week, it passed House Bill 741, which would restore mandatory sentencing for a wide variety of crimes, many of them drug-related.

The Legislature took up the issue because several mandatory sentencing laws were overturned by the state Supreme Court in 2015. Supporters of the new bill wanted to rectify the flaws in the old laws so they could withstand a court challenge.

The bill has support from the state's district attorneys - none of them want to be accused of being soft on crime. But these prosecutors have other motives. For starters, they have used the threat of mandatory sentences, particularly in drug-related cases, to move up the chain of command and nab bigger fish. Plea deals can be had by small dealers willing to snitch on their suppliers.

To put it another way, it is not a criminal justice tool, it is a bargaining tool.

Another reason is that if sentences are longer, the prisoners are sent to state prison. (In Philadelphia, people sentenced to under two years serve their time in city jails. Those sentenced to two years or longer go to state prisons.) The more prisoners a county can hand off to the state, the more it will save in its prison costs. So counties have a financial incentive to favor longer sentences.

State Corrections Commissioner John Wetzel is against the bill, partly because he is trying to reduce the state population, and he thinks HB741 could raise the state prison population by 1,200 in the coming years, at a cost of up to $85 million more than the $2.4 billion already spent each year on state prisons.

Wetzel also has data that shows longer sentences increase the likelihood an ex-offender will return to jail.

Gov. Wolf opposes the House legislation. As important, so does state Sen. Stewart Greenleaf, (R., Montgomery) who chairs the Senate Judiciary Committee. Greenleaf was once a proponent of mandatory sentencing. Having observed its effects since 1978, the year he was elected to the Senate, Greenleaf has a simple answer to those who push these bills: Mandatory sentencing has been tried. It hasn't worked. And he has no intention of repeating the mistakes of the past.