Felony arrests rose slightly last year in Chicago after a decade of declines, due in large part to more drug busts and cops going after people with outstanding warrants, according to the police.

Officers arrested a total of 84,717 people in 2018 compared with 82,663 in 2017, a 2 percent increase, according to the Chicago Police Department.

The 2018 arrest total was included in the city’s recently released Comprehensive Annual Financial Report.

So far this year, felony arrests have continued to rise, according to the police. There were 47,467 arrests through Sunday compared with 43,831 over the same period of 2018, an 8 percent rise.

Still, in 2009, there were 181,254 arrests. The police department’s arrest totals had steadily decreased year after year until 2018.

Martin Preib, second vice-president of the Fraternal Order of Police, said, “A central factor in the decline of arrests is the false vilification of the police by the activist media.”

But he didn’t address the bump in arrests in 2018 and so far this year.

Factors that may have led to the slowdown in arrests over the past decade include a police manpower shortage and officers’ resistance to reforms that stemmed from a federal civil-rights investigation into the 2014 fatal police shooting of Laquan McDonald.

Then-Mayor Rahm Emanuel initially countered the manpower shortage through hefty overtime spending to keep cops on the streets.

In recent years, though, he went on a hiring spree to add almost 1,000 more officers to the department.

Narcotics arrests constituted a large chunk of the city’s total arrests in 2018. There were 12,647 drug arrests last year, a 21 percent increase over 2017.

Anthony Guglielmi, chief spokesman for the police department, said last year’s rise in drug arrests stemmed from officers targeting areas where shootings are connected to narcotics sales, including street corners where dealers are selling marijuana.

That may explain why possession of more than 10 grams of cannabis appeared in nearly twice as many police case reports last year as in 2017.

Authorities are waiting to see how legalization of recreational marijuana will affect the city’s illegal drug markets — and drug arrests. The law signed by Gov. J.B. Pritzker goes into effect on Jan. 1.

The biggest single category of arrests last year was for people with warrants. Almost 13,100 people were arrested on warrants last year, a 4 percent increase over 2017.

Arrests also were up 8 percent for murder, 40 percent for criminal sexual assault and 16 percent for aggravated battery, although there were far fewer arrests for those crimes than for drugs or warrants, according to the police.

Arrests for robbery were flat and arrests for theft, burglary, motor vehicle theft declined.

So far this year, Chicago crime is down in most categories, including murder, compared with the same period of the last three years. But there were fewer murders over the same period of 2015.