It started out as a domestic-battery call.

Chicago Police officers rolled up to the 4600 block of West Adams Street right before midnight on Nov. 27. Richard “Little Earl” Grimes had just shot his 24-year-old girlfriend, wounding her and killing her unborn child, police say.

When an officer got out of his vehicle, Grimes opened fire, grazing the officer in the head. Grimes ran away and he was shot to death about a block away after he fired again at officers, according to police officials.

The shooting of the 43-year-old officer was captured on a police vehicle’s in-car video camera, said Anthony Guglielmi, chief spokesman for the police department.

“It’s hard to watch,” Guglielmi said. “It shows what officers have been up against this year.”

This year, according to Guglielmi, officers have come under fire 31 times in Chicago, compared with 18 times in 2015 and 15 times in 2014. No Chicago Police officers have been killed this year.

Armed attacks on officers also have escalated in other cities across the country.

According to the National Law Enforcement Officers Memorial Fund, 64 officers have died of gunshot wounds in 2016 — up 68 percent from 2015, when 38 officers were killed that way.

“Safety is a critical concern,” said Dean Angelo, president of Chicago’s Fraternal Order of Police.

Angelo echoed what Mayor Rahm Emanuel has been saying for years: the criminal-justice system needs to get tougher on people who carry firearms illegally.

“You shouldn’t get bond when you are caught with a gun,” Angelo said. “The judges and Cook County prosecutors have to take the gloves off.”

“Law enforcement has been demonized as being the bogeyman,” he said. “The system has to come down as hard as possible on individuals responsible for firing on the police.”

In an interview last week, Chicago Police Supt. Eddie Johnson blamed the rise in armed attacks on officers on anti-law enforcement sentiments that emerged after the 2014 killing of a black man, Michael Brown, by a white police officer, Darren Wilson, in Ferguson, Mo. The Justice Department found the officer didn’t violate Brown’s civil rights.

Those anti-cop feelings intensified in Chicago following the November 2015 release of the video of a white police officer, Jason Van Dyke, fatally shooting Laquan McDonald, Johnson said.

The animus against police officers has led to violence, not only against police but against civilians, Johnson said. Chicago’s murder toll has surpassed 750 this year, the most in decades.

“The bad guy has become emboldened to do what they do because the national narrative is against the police right now,” Johnson said.

“It’s very alarming,” he said. “So until we flip that narrative back, we might continue to see this.”

The McDonald video, the subsequent firing of police Supt. Garry McCarthy and new requirements for how police must document street stops have contributed to a difficult environment for Chicago cops to do their jobs, Johnson said.

“Officers have become more cautious because the regulatory climate surrounding policing has changed,” Guglielmi said.

That caution could be reflected in statistics which show that while armed attacks on officers have soared this year in Chicago, police-involved shootings haven’t, authorities say.

Chicago Police officers shot 27 people — 13 fatally — through Dec. 21, 2016, according to the Independent Police Review Authority, which keeps such statistics. Last year, officers shot 30 people, eight fatally; in 2014, they shot 50 people, 18 fatally; and in 2013, they shot 43 people, 13 fatally.

Experts on officers’ use of force have pointed to an October struggle between a PCP-crazed man and a female Chicago cop as an example of a case in which officers would have been justified in using deadly force, but opted not to use it. The officers desperately tried to pull the man off the female officers and eventually used a Taser to subdue him.

The incident was captured on widely publicized videos taken from police cars and officers’ body cameras.

Ed Yohnka, the spokesman for the American Civil Liberties Union of Illinois, said there’s a danger of drawing conclusions about how officers are policing in Chicago based on a few controversial videos.

“In an agency of thousands of officers, there is never going to be a single, uniform reaction to anything,” he said.

Asked if he thinks the recent, national movement for police reform is driving more attacks on police — and causing cops to disengage — he said the rising violence is a symptom that “policing in Chicago is broken.”

“If you look across the country, the places that are safest are where the trust between the community and the police is the highest,” he said. “In large measure, we keep pointing to stats like this which are really symptoms — and not the cause — of the problem.”

“Policing in Chicago is broken,” said Yohnka, whose organization, the ACLU, entered an agreement last year with the police department to require officers to provide more documentation about their street stops. “The system of trust between the community and the police has been completely shattered. And that trust is really critical to good law enforcement.”

“For people in communities of color, this kind of distrust of the police goes back generations. It’s not brand new. So to pretend there is some singular thing that is happening in a particular moment misses the point of the hard work that will be necessary for reform,” he said.