Earlier this month, a teenage boy charged with trying to steal a retired cop’s idling car on a Friday evening on the Gold Coast was arrested again two days later for another carjacking.

And, truth be told, there was nothing at all surprising about that.

Chicago has seen so many more carjackings — nearly 1,000 last year compared with 663 in 2016 and far fewer the two years before that — that lawmakers are rushing to enact a solution. Last month alone, the city was victimized by 86 carjackings, 19 percent more than in January of last year.

Carjacking, in which a car is stolen by force, has become a serious problem in Chicago and the suburbs. Something should and can be done, without returning to the days when large numbers of young people languished behind bars without being convicted of crimes.

Bottom line, gun crimes cannot be tolerated.

EDITORIAL

Chicago police have formed an interagency task force to address carjackings, and over the weekend Evanston police warned the crime has spread to that suburb. But the thieves behind the crimes often aren’t prosecuted.

In Monday’s Sun-Times, Frank Main reported that dozens of juveniles were charged last year with armed carjackings, but most were detained no longer than 24 hours. That amounts to a dangerous “revolving door” in the juvenile court system, as state Sen. Bill Cunningham put it. More juveniles than adults were arrested for armed carjackings last year.

Statewide, there has been a movement in recent years — a movement we strongly support — to eliminate long stretches of incarceration for juveniles. We have supported eliminating mandatory life sentences for juveniles, implementing safeguards during interrogations of juveniles, and ending indiscriminate shackling of juveniles in courtrooms. We also supported treatment programs and other community-based programs for nonviolent offenders.

But society must draw the line when criminals carjack vehicles at gunpoint and then slip away through a glaring legal loophole. The way the law works now, the police and prosecutors must prove that someone caught driving a stolen vehicle knew that the vehicle was stolen. That’s a tough standard of proof that often results in nothing more than misdemeanor charges.

Every hijacker knows that if caught by the cops, the standard dodge should go something like this: “Gee, officer, I didn’t know the car was stolen. My friend let me borrow it. His name is Gary. I can’t remember his last name.”

State Rep. Jaime Andrade and state Sen. Tony Munoz, both Chicago Democrats, are proposing legislation backed by Mayor Rahm Emanuel and Police Supt. Eddie Johnson that would increase the penalties for driving in a stolen car. The aim of the bill, modeled on a California law, is to prevent arrested carjackers from being quickly released and striking again.

Before a final vote in Springfield, lawmakers must be careful to avoid turning young people into felons — along with the attendant subsequent difficulty in getting jobs and housing — for riding a car they didn’t know was stolen. Illinois also must face up to the effects of drastic budget cuts to programs designed to stop crime before it starts, such as Teen REACH, After School Matters and homeless prevention programs.

By contrast, in Florida, the Pinellas County sheriff’s office has started working for the first time with the county’s mental health agency to address carjackings and other crimes by dealing with underlying causes often crime.

But Illinois also needs a new law with teeth. We should all be appalled that people — of any age — who use a gun in the course of a carjacking are routinely returned to the streets within 24 hours.

Send letters to letters@suntimes.com.