U.S. Attorney General nominee Jeff Sessions vowed Tuesday to step up prosecutions of gun crimes to stop a surge in violent crime in Chicago and other cities.

During his U.S. Senate confirmation hearing, Sessions also said police officers in Chicago and across the nation have been “unfairly” blamed for the “unacceptable actions of a few bad actors.”

“They feel they’ve been targeted. Morale has suffered,” said Sessions, a Republican U.S. senator from Alabama.

The attorney general-designate said a rise in the number of police officers killed on the job across the country was a “wake-up call” for a situation that “can’t continue. … Local law enforcement must know they are supported.”

The promise to make prosecution of gun crimes a high priority came in response to a question from Sen. John Cornyn, R-Texas.

“We’ve seen an incredible number of people, frequently in minority communities, killed as a result of crimes related to felons who perhaps are in possession of guns that they have no legal right to be in possession of,” Cornyn said.

Cornyn said Project Exile, a federal gun prosecution program that originated in Richmond, Va., was successful in targeting felons and others who illegally possessed firearms.

But “when I looked at the record of the … Justice Department, prosecution of those crimes were down 15.5 percent in the last five years. Down 34.8 percent in the last 10 years,” he said.

Men in KKK costumes disrupt Sessions confirmation hearing

A Chicago Sun-Times story last year found that federal weapons charges in Chicago have fallen slightly over the past five years — despite the local rise in firearm offenses. Federal prosecutors in some other major urban areas — Manhattan, Brooklyn, Milwaukee, Detroit and Baltimore — have charged far more people with weapons offenses than the U.S. attorney’s office in Chicago has.

“Can you assure us that you will make prosecuting those people who cannot legally possess or use firearms a priority again in the Department of Justice and help break the back of this crime wave that’s affecting so many people in our local communities like Chicago or Baltimore, particularly minority communities?” Cornyn asked.

“Properly enforced, the federal gun laws can reduce crime and violence in our cities and communities. It was highlighted in Richmond and Project Exile. But I have to tell you, I’ve always believed that,” Sessions replied.

“Criminals are most likely the kind of person who will shoot somebody when they go about their business. And if those people are not carrying guns because they believe they might go to federal court, be sent to a federal jail for five years perhaps, they will stop carrying those guns during that drug dealing and their other activities that are criminal,” he said.

“Fewer people get killed. So I truly believe that we need to step that up. It’s a compassionate thing. If one of those individuals carrying a gun shoots somebody, not only is there a victim. They end up sentenced in jail for interminable periods. Communities are safer with fewer guns in the hands of criminals.”

In prepared remarks to the committee, Sessions also mentioned the more than 4,330 shooting victims in Chicago in 2016.

“We must not lose perspective when discussing these statistics. We must always remember that these crimes are being committed against real people, real victims,” he said. “These trends cannot continue. It is a fundamental civil right to be safe in your home and your community. If I am confirmed, we will systematically prosecute criminals who use guns in committing crimes.”

Sessions also said legitimate criticism of individual police officers’ actions has spilled over to condemnation of entire police departments.

“Morale has been affected and it’s impacted the crime rates in Baltimore and the crime rates in Chicago,” he said. “I don’t think there’s any doubt about it. I regret that’s happening. I think it can be restored.”

When Sessions pointed to poor morale among Chicago Police officers, he touched on a wide perception that cops engaged in a work slowdown in 2016 because they believe they’ve come under unfair scrutiny following the Laquan McDonald shooting.

In November, the city released the video of Officer Jason Van Dyke fatally shooting McDonald. Van Dyke was charged with murder on the same day the video was released.

Before the release of the video, Chicago Police officers were making about 50,000 street stops per month. After the video was made public, that figure dropped to about 10,000 a month.

Narcotics arrests also plummeted after the release of the video.

Meanwhile in 2016, the number of murders and nonfatal shootings skyrocketed. There were more than 760 murders last year, a 60 percent increase over the same period in 2015.

Social scientists have been reluctant to draw a direct connection between the slowdown in police activity and the rise in murders. But former Chicago Police Supt. Garry McCarthy recently made that link during an appearance on CBS’s “60 Minutes.”

“When you have activity falling off the way it is and crime skyrocketing, that’s a huge problem,” McCarthy said. He added: “Noncompliance with the law is becoming legitimized. And the police are on their heels.”

Sessions could give Chicago Police officers a morale boost if he were to decide not to implement Chicago Police reforms expected to come in a Department of Justice report this week.

President-elect Donald Trump had campaigned on a promise to take the handcuffs off rank-and-file police officers. Sessions has said he opposes consent decrees and refused to commit to implementing the reforms during a recent meeting with Sen. Dick Durbin, D-Ill. Mayor Rahm Emanuel has vowed to implement the Justice Department reforms, whether or not Trump and Sessions pursue a consent decree mandating those changes.