Former NYPD Commissioner Howard Safir blames former Attorney General Eric Holder for spending more time investigating police rather than criminals.

Police throughout the nation say they fear a growing anti-cop sentiment driven by a handful of racially-charged incidents is making their jobs more dangerous on the streets, where the number of officers killed in the line of duty is rising sharply.

"Nobody goes into law enforcement wanting to be hated. "

— David Cruickshank,The Law Enforcement Research Group

High-profile cases involving police and black suspects from Missouri to Baltimore have prompted intense criticism of law enforcement, from not only activists but the media and even the White House, leaving law enforcement officers alienated and angry, say cop advocates. And the protests, rioting and federal investigations come even as the job of keeping Americans safe has become more dangerous.

“Nobody goes into law enforcement wanting to be hated," David Cruickshank, a Connecticut police officer and CEO of the Law Enforcement Research Group, told FoxNews.com. "Most get into this line of work for their love of their community.”

Cruickshank and other law enforcement advocates worry that what they see as an anti-cop climate is killing morale in police departments of every size.

While racially tinged incidents are nothing new, the firestorm that erupted with the shooting of an unarmed black man, Michael Brown, last August in Ferguson, Missouri, has been followed by a grand jury's decision not to indict an NYPD cop in the death of Eric Garner, the death of Freddie Gray while in the custody of Baltimore police and this week's decision by police in Madison, Wis., not to charge a police officer in the March 6 shooting death of an unarmed black youth.

The U.S. Justice Department investigated the Ferguson case and determined early accounts that Brown was killed as he surrendered with his hands raised were unfounded, yet delivered a scathing critique of the city's police department, accusing it of racism and racial profiling. The Department of Justice is still investigating the death of Garner, who died while being subdued by a police officer, and has launched a probe into the death of Gray even as six Baltimore police officers face criminal charges as serious as murder.

Hattiesburg police officers salute their fallen fellow officer Benjamin Deen as the hearse carrying his body arrives at the Hulett Winstead Funeral Home in Hattiesburg, Miss., Monday, May 11, 2015. Officers Deen and Liquori Tate were gunned down Saturday night during a traffic stop near the East 4th and Bouie Street intersection. (Photo by Ryan Moore/WDAM-TV via AP)

All of the cases have sparked protests, including some that have degenerated into looting and rioting.

Former NYPD Commissioner Howard Safir believes there is a "war on police," and said the flames are being fanned from the nation's highest office.

“After 20 years of incredible crime reduction accomplished by thousands of dedicated police officers, the public has become complacent now that they are safer," said Safir, who led the nation's largest police department from 1996-2000. "They have let the anti-police pundits and talking heads convince everyone from the president to the attorney general that police are racist and brutal.”

More troubling than plummeting morale are statistics that show police lives are in more danger than they have been in years. According to new preliminary data released by the FBI on Monday, the number of law enforcement officers killed in the line of duty in 2014 nearly doubled to 51 from 27 the previous year. One particularly shocking case was the Dec. 20 assassination of two NYPD police officers as they sat in their patrol car in Brooklyn. Their killer, Ismaaiyl Brinsley, who had posted threats online about killing police officers, killed himself on a nearby subway platform as police closed in on him moments later.

“No warning, no provocation — they were quite simply assassinated, targeted for their uniform,” an angry NYPD Police Commissioner William Bratton said at the time.

Although official 2015 numbers are not yet available, the current year has seen a spate of high-profile police killings, including last week's murders of two police officers during a traffic stop in Hattiesburg, Miss., and the shooting of an NYPD officer in Queens, N.Y. on April 22.

Safir says that the national mood over the past two decades has emboldened many criminals.

“As criminals see the police restrained by new laws, policy and regulations that restrict tactics like "stop and frisk" or "broken windows," they no longer fear the police and certainty of arrest,” Safir said. “While in the past, they would not carry their weapons because of fear of arrest, they now do, and therefore the opportunity for armed confrontations with police significantly increases.”

Many among the nation's approximately 800,000 federal, state and local police officers are questioning their career choice, said Jon Adler, president of the Federal Law Enforcement Officers Association.

“With the recent tragic loss of three fallen heroes, and a contagion of anti-cop rhetoric permeating, some have understandably reached the point of re-evaluating what they're risking their life for,” Adler told FoxNews.com. “Similar to athletes on the playing field, sometimes it's difficult to tune out the boos from the no-talents sipping their drinks, sitting comfortably in their seats.

"It's demoralizing to read about the misguided anti-cop gibberish spewing from those who take their freedoms for granted,” he added.

While many in law enforcement say President Obama has been too quick to judge police and not sufficiently appreciative of what they do day in and day out, Vice President Joe Biden acknowledged the tough task of cops this week at the annual "Top Cops Dinner" in Washington Tuesday.

“What shape we’d be in as a nation if we didn’t have you doing the job,” Biden said to a roomful of police officers gathered at the Marriott. “We expect you to do everything.

"We expect you to be constitutional scholars. We expect you to have instantaneous reactions to a crisis without making any mistake or without knowing what’s behind that door or what’s in that guy’s pocket,” Biden continued. “When you make a mistake, we come down on you like a ton of bricks. But you still do your job.”

Perry Chiaramonte is a producer with Fox News Channel's Investigative Unit. Follow him on Twitter at @perrych