Former New York City Mayor Rudy Giuliani blamed President Barack Obama for anti-police "propaganda" that eventually led to the shooting death of two New York City police officers.

The Dec. 20 shooting happened amid rising tension between the black community and law enforcement across the country over racial disparities in the criminal justice system. Commenting on the shooting on Fox News , Giuliani said politicians’ rhetoric, as well as protests, exacerbate the tension.

"We’ve had four months of propaganda, starting with the president, that everybody should hate the police," Giuliani said. "The protests are being embraced, the protests are being encouraged. The protests, even the ones that don’t lead to violence, a lot of them lead to violence, all of them lead to a conclusion: The police are bad, the police are racist. That is completely wrong."

Giuliani’s claim that Obama said something akin to "everybody should hate the police" struck us as overheated right off the bat, so we decided to look into it. We asked Giuliani for a response but we didn't hear back.

Almost one month ago, Giuliani faced backlash for some controversial remarks about race and the criminal justice system. He questioned why the same Americans protesting black deaths at the hands of white police officers do not voice similar outrage about black-on-black crime.

In response to his most recent comments, we sifted through Obama’s statements and interviews on the subject since August, when the situation first bubbled up after a white police officer killed black teenager Michael Brown in Ferguson, Mo. Even the most distorted readings of Obama’s remarks cannot be interpreted as encouraging people to "hate the police."

Obama has repeatedly emphasized that the work police do is dangerous to themselves but very important to the community. He has said that although "a gulf of mistrust exists between local residents and law enforcement" (an oft-repeated talking point), the vast majority of law enforcement officers do not carry out the law in a discriminatory manner. He has also argued that improvement -- achieved through peaceful and cooperative means -- is necessary.

Part of Giuliani’s point is that Obama has been empathetic to the protesters, which he has been -- though cautiously so. And he has always discouraged violent protests and excessive police response.

Here’s a selection of telling passages from Obama’s comments on race and the criminal justice system since August. We fail to see how they support Guiliani’s point.

Aug. 14, Obama's first statement following Brown's death:

There is never an excuse for violence against police, or for those who would use this tragedy as a cover for vandalism or looting. There’s also no excuse for police to use excessive force against peaceful protests, or to throw protestors in jail for lawfully exercising their First Amendment rights.... Put simply, we all need to hold ourselves to a high standard, particularly those of us in positions of authority.

Aug. 18, Obama’s second statement following Brown’s death:

I’ve said this before -- in too many communities around the country, a gulf of mistrust exists between local residents and law enforcement... This is not an argument that there isn’t real crime out there, and that law enforcement doesn't have a difficult job and that they have to be honored and respected for the danger and difficulty of law enforcement.

Sept. 28, speech at the Congressional Black Caucus awards dinner:

In too many communities around the country, a gulf of mistrust exists between local residents and law enforcement… One recent poll showed that the majority of Americans think the criminal justice system doesn’t treat people of all races equally…. And that has a corrosive effect -- not just on the black community; it has a corrosive effect on America. It harms the communities that need law enforcement the most. It makes folks who are victimized by crime and need strong policing reluctant to go to the police because they may not trust them.

Nov. 24, remarks following a grand jury’s decision not to indict the officer who shot Brown:

Understand, our police officers put their lives on the line for us every single day. They’ve got a tough job to do to maintain public safety and hold accountable those who break the law…. The fact is, in too many parts of this country, a deep distrust exists between law enforcement and communities of color. Some of this is the result of the legacy of racial discrimination in this country. And this is tragic, because nobody needs good policing more than poor communities with higher crime rates…. There are issues in which the law too often feels as if it is being applied in discriminatory fashion. I don't think that's the norm. I don't think that's true for the majority of communities or the vast majority of law enforcement officials. But these are real issues.

Dec. 1, remarks after meeting with community and law enforcement

Ferguson laid bare a problem that is not unique to St. Louis or that area, and is not unique to our time, and that is a simmering distrust that exists between too many police departments and too many communities of color…. We also heard law enforcement and were reminded of what a tough job it is to be in law enforcement. Whether you’re in a big city or in a small community, as (Attorney General) Eric Holder put it, police officers have the right to come home. And if they’re in dangerous circumstances, we have to be able to put ourselves in their shoes and recognize that they do have a tough job.

Dec. 3, remarks after grand jury decision not to indict New York City officers involved in death of Eric Garner

I say that as somebody who believes that law enforcement has an incredibly difficult job, that every man or woman in uniform are putting their lives at risk to protect us, that they have the right to come home, just like we do from our jobs, that there’s real crime out there that they’ve got to tackle day in and day out -- but that they’re only going to be able to do their job effectively if everybody has confidence in the system. And right now, unfortunately, we are seeing too many instances where people just do not have confidence that folks are being treated fairly. And in some cases, those may be misperceptions; but in some cases, that’s a reality.

Dec. 8, interview with BET

And one of the things that I want us to make sure we understand is that, communities of color need good law enforcement. I mean, there’s a lot of crime, and one of the things that we talked about on Monday here was you’ve got young people who end up getting caught between police that they don’t trust and folks on the streets who are trying to rough them up…. And I’ve said it before: The vast majority of law enforcement officers are doing a really tough job, and most of them are doing it well and are trying to do the right thing. But a combination of bad training, in some cases; a combination in some cases of departments that really are not trying to root out biases, or tolerate sloppy police work; a combination in some cases of folks just not knowing any better, and in a lot of cases, subconscious fear of folks who look different -- all of this contributes to a national problem that’s going to require a national solution.

Our ruling

Giuliani said Obama has said "that everybody should hate the police."

Throughout all of his comments since August, when the latest unrest over racial disparities in the criminal justice system began, Obama has continuously encouraged working with police to find solutions and make change. He has also repeatedly emphasized the importance of law enforcement in communities of color and the fact that police officers have a dangerous job.

Giuliani’s claim is an outlandish distortion of what Obama actually said. We rate this Pants on Fire.

Help fund PolitiFact's Kickstarter to live fact-check the 2015 State of the Union and GOP response.