The war on drugs may not be over in Chicago, but it’s in retreat.

In 2015, total drug-related arrests dropped to the lowest level in three decades, a Chicago Sun-Times analysis of city crime data found.

And the rate of drug busts plunged more sharply in the first four months of 2016. Chicago Police are on pace to make 13,000 narcotics arrests by year’s end. That would be the smallest annual tally since 1973, two years after President Richard Nixon declared a national war on drugs.

Police and prosecutors say cops have been less aggressive on the street since the November release of the dashcam video showing 17-year-old Laquan McDonald shot 16 times by Officer Jason Van Dyke.

But the downturn in drug arrests began long before then. And while police are making fewer arrests for other offenses, the number of narcotics busts has fallen faster — by nearly half between 2008 and 2015.

It shows in the courts.

One day last week at a courthouse at Belmont and Western, only 10 cases came before the judge, and only one involved a drug charge.

In a courthouse on the West Side — where police make the most drug arrests — a judge said his court calls are finished 45 minutes earlier than a year ago.

Police say the numbers reflect a change in their philosophy.

Officers have issued thousands of tickets for marijuana possession since 2012, when an ordinance allowed an alternative to arrests, said Anthony Guglielmi, chief spokesman for the department.

He also said police have recently joined the city’s efforts to get drug users into treatment instead of locking them up.

Last month, the first two people were diverted into treatment programs after they were swept up in a sting on a heroin operation on the West Side. Another sting is planned this month and police hope to place a larger number of addicts in treatment.

The department is continuing to pursue drug cases against violent gangs, Guglielmi emphasized.

“The Chicago Police Department has implemented a strategic crime-fighting plan that focuses enforcement around the disproportionate number of violent offenders, most of whom are documented gang members and pose the greatest risk to our neighborhoods,” he said.

Even though drug arrests are down citywide, they’re up “considerably” by specialized narcotics units, Guglielmi said.

To put the city’s overall decline in drug arrests in perspective, in 1973 police reported making 11,572 arrests for drug offenses.

That ranked far below other crimes, including 98,557 arrests for disorderly conduct, the top cause of arrest, and 20,075 for drunkenness. Altogether, Chicago cops made more than 265,000 arrests that year.

Eventually police started issuing tickets for public drinking and other low-level infractions rather than putting offenders in handcuffs.

Yet the narcotics crackdown grew steadily as officers made a priority of busting people caught with even trace amounts of drugs, especially in black and Hispanic neighborhoods.

The high point in the city’s war on drugs came in 2004, when cops made more than 57,000 arrests for narcotics crimes, a rate of 156 a day.

Marijuana possession has been the leading drug offense since at least the mid-1960s. One of every eight arrests made by police is for misdemeanor pot possession, a figure that has changed little over the past 15 years.

But the number of arrests for possessing 30 grams or less of pot — the lowest-level drug crime — shrank more than 50 percent between 2011 and 2015.

In 2012, amid a national discussion about reforming marijuana laws, the City Council gave officers the option of issuing tickets rather than booking pot possessors. Many cops stopped enforcing the pot laws altogether.

Crime experts say another factor for the decline in drug arrests, and in other crime categories, is that there are 1,200 fewer police officers on the force than five years ago, according to city payroll records.

The arrest numbers also highlight shifting tastes in drugs, at least in the West and South Side neighborhoods where police make frequent stops and drug arrests remain concentrated.

After exploding in availability in the 1990s, the popularity of crack cocaine waned by 2010. In 2001, crack possession accounted for one of every 10 arrests in Chicago but now accounts for one of every hundred. In 2010, heroin possession passed crack possession in arrest totals.

At the peak of Chicago’s war on drugs, the court calls at branch courthouses in Cook County were packed with drug cases, most involving the possession of small amounts of marijuana, cocaine or heroin.

But the scene was much different in the felony courtroom at Belmont and Western on a recent morning.

Of the 10 cases before Judge Marvin Luckman, seven of the defendants were charged with retail theft. They included a man accused of stealing a bottle of Head & Shoulders shampoo and a bottle of Advil worth $21 total. Other cases concerned vandalism and burglary.

Only one case involved drugs.

Officers said they had seen an 18-year-old vandalizing a wall along the Kennedy Expy. in River North on April 25. After a foot chase, they caught the West Rogers Park teen, who was carrying six pills of hydrocodone, a prescription painkiller. The cops charged him with possession of a controlled substance, a felony, along with criminal damage to property, a misdemeanor.

Luckman expressed outrage, but not at the drug charge. He noted that tagging costs taxpayers millions of dollars a year.

“It’s a disgusting charge,” the judge said.

He insisted the teen serve five days in a manual-labor program overseen by the Cook County sheriff.

The felony drug charge? Prosecutors agreed to drop it if he attended a drug-education program.

Luckman signed off on the deal to the relief of the teen’s parents.

A former Chicago Police captain, John Roberts, who lost his 19-year-old son to a heroin overdose, said there’s a growing sentiment among police chiefs across the country that they can’t arrest their way out of the drug problem.

Roberts agrees with sending drug users to treatment rather than prison — and hammering traffickers who sell “poison” and cause violence.

“I fell for this for 30 years,” he said. “Drug arrests were up, but what did we accomplish?”