When President Obama nominated James B. Comey as FBI Director two years ago, he remarked, “To know Jim Comey is also to know his fierce independence and his deep integrity.”

White House officials repeated that message Friday as they tried to explain how Comey and Obama arrived at different interpretations of the legacy of federal sentencing rules and whether heightened scrutiny had prompted some law enforcement officials to retreat from policing minority neighborhoods.

In many ways, the split between the president and his FBI director underscores the fraught terrain both men have entered in talking about racial disparities in the U.S. criminal justice system. Comey’s observation that the “age of viral videos” has changed police behavior grew out of a series of bureau listening sessions he instituted in a bid to tackle the issue of race, multiple law enforcement officials said. Obama, for his part, has been urging changes to the nation’s incarceration practices and curbs to illegal and abusive police behavior. And he has tried to advance those changes without alienating the law enforcement community.

Obama and Comey met privately Thursday, although neither White House nor Justice Department officials would describe the conversation. On Friday, White House press secretary Josh Earnest emphasized the “important independent law-enforcement role” any FBI director plays in the federal government.

“The fact of the matter is, the president believes that the director of the FBI, particularly, with somebody who has the prodigious skills of Director Comey, must be involved in grappling with the difficult policy debates that we’re having in this country right now in balancing security and the protection of civil liberties,” Earnest said.

Current and former law enforcement officials, including former U.S. attorney Patrick J. Fitzgerald, who has known Comey for nearly three decades, said the FBI director and those close to him were surprised at what they see as the distortion of his frank comments.

“The people who know Jim well know that he speaks from the heart and is very committed to making policing better,” Fitzgerald said. “A lot of people who have had reactions to his speech have not read the speech. I don’t view this as Jim making a split at all with the president. I see this as Jim speaking out and saying let’s think thoughtfully about a complicated issue. That has been his practice always.

White House officials were privately irritated that Comey has suggested in two recent speeches — at the University of Chicago Law School on Oct. 23 and at a speech to the International Association of Chiefs of Police three days later — that there is a link between recent protests against excessive use of force by police and this year’s spike in homicides in some major U.S. cities. This theory is often dubbed “the Ferguson effect,” a reference to the aftermath of the 2014 police shooting of black teenager Michael Brown in Ferguson, Mo.

“I don’t know whether this explains it entirely, but I do have a strong sense that some part of the explanation is over the last year a chill wind blowing through American law enforcement,” Comey said in his speech to police chiefs.

Comey’s most recent speeches were an outgrowth of a candid talk he delivered on race at Georgetown University in February. In that speech, Comey spoke about the “hard truths” of policing and acknowledged the racial bias and “disconnect” between police agencies and communities of color.

After giving that speech, Comey asked all of his special agents in charge who oversaw the FBI’s field offices in every state to organize community meetings based on the questions and issues he raised in his Georgetown speech. He told them to bring together community leaders, students, business leaders and students to discuss race and policing.

“His goal is to get people together and talk about these hard issues,” one official said. “You can’t do it from a distance.”

Chuck Wexler is the executive director of the Police Executive Research Forum and met the FBI director two decades ago when Comey was prosecuting federal gun cases in Richmond, Va. Comey’s speech at Georgetown “said to me this is a different FBI director,” Wexler said.

“His speech resonated with a lot of us, because local police departments have been grappling with the issues of hiring, diversity and allegations of racial profiling for some time now,” Wexler said.

The president, however, has publicly rejected the analysis Comey has offered, which was based on his informal survey of his field staff and police.

The two men have also diverged on whether the United States erred in giving so many drug offenders extended sentences during the 1980s and ’90s. Obama has issued pardons to dozens of such felons and is pressing to reduce the mandatory minimum sentences retroactively and for future offenders, while Comey said they had a positive impact and “didn’t happen en masse.”

This week the FBI director praised efforts to achieve “more just” federal sentencing. “But we should debate sentencing reform with a fair and honest understanding of history and avoid language that distorts reality.”

On Friday, Earnest suggested that even if Comey breaks ranks with the president, White House officials expect somebody “who serves in a position like the director of the FBI, that their views would be taken into account when we’re making policy decisions when it comes to criminal justice reform.”