President Obama waves after speaking to service members at the Naval Station Rota, in southwestern Spain on July 10. (Jorge Guerrero/AFP/Getty Images)

Almost exactly three years ago, President Obama stood in the White House briefing room and said that he didn’t think it would be “particularly productive” for him to convene “a national conversation on race.”

But in the wake of a recent series of high-profile, racially charged shootings across the country, the president this week found himself doing exactly that.

Obama spent Monday preparing to address the nation at a Tuesday memorial service in Dallas for five slain police officers and meeting with advocates at the White House in an effort aimed at bridging the divide between law enforcement and communities of color.

The president met for nearly two hours with leaders of eight law enforcement groups Monday, informing them that he considered the killing of the five police officers in Dallas on Thursday “a hate crime” and that he would work actively to serve as an intermediary between minority activists and police.

“I’m your best hope,” Obama remarked at one point, according to the Fraternal Order of Police’s James O. Pasco, one of the meeting’s attendees.

President Obama will host a meeting with law enforcement officials, activists and civil rights leaders on Wednesday to discuss ways to repair "the bonds of trust" between communities and police, the White House said Monday. (Reuters)

“I don’t disagree,” said Pasco, who has criticized aspects of the administration’s gun-control policy. “We’re all in this together.”

The president dropped in unannounced on the meeting with police officials that had been organized by Vice President Biden. He also scheduled a meeting for Wednesday with representatives from law enforcement, the activist community and academia, a move that reflects his hope of addressing two of the biggest frustrations of his presidency: reforming the criminal justice system and reducing gun violence. As he tries to address those colliding issues, Obama is also scrambling to defuse tensions with law enforcement.

Monday’s meeting in the Roosevelt Room included representatives from the Fraternal Order of Police, the National Sheriffs’ Association and the Major Cities Chiefs Police Association, among others. One attendee, the National Association of Police Organizations’ executive director, William Johnson, last week accused Obama of being “the Neville Chamberlain” in the “war on cops” that is underway in America.

The president took on that criticism directly, Johnson said, saying he was not encouraging violence against law enforcement and had publicly criticized anyone who encouraged such action over the weekend while he was traveling in Spain.

Johnson said he appreciated Obama speaking out against violence aimed at police officers, but he said he feels that it has not been enough.

“We need that strong talk before” an incident happens, Johnson said in an interview.

Several law enforcement officials at the session called on the president to revisit his decision to cut off the sales of surplus military equipment to local law enforcement agencies. Obama said he would go through the list of prohibited equipment in the program “item by item,” Johnson said.

The meeting came as Obama drafted remarks that he will deliver at a service Tuesday honoring the five police officers killed Thursday by a gunman during a peaceful protest march in Dallas. On Wednesday, the White House will host a broader meeting in what press secretary Josh Earnest called an effort at “repairing the bonds of trust that have frayed in so many communities.”

After George Zimmerman was acquitted in July 2013 in the shooting of an unarmed black teenager, Trayvon Martin, Obama said that Americans needed to reexamine their attitudes on race through private introspection. But the attack in Dallas and the deaths of two African American men at the hands of police last week have left him little choice but to try once more to orchestrate a more public dialogue.

“What we’ve learned over the past week is that politicians don’t get to choose when we are having a national conversation on race,” said Jeff Shesol, who served as a speechwriter under President Bill Clinton, adding that Obama has a crucial role to play in that. Still, he added of the president and his aides, “I don’t think that they’re under any illusion that alchemy happens when he steps to the microphone.”

With just six months left in office, a GOP-controlled Congress and a decentralized policing system in the United States, there is little the president can do legislatively to change the way law enforcement operates.

But as the shootings have raised questions about both police misconduct and the risks law enforcement officers face during protests, Obama is hoping to leverage his position to highlight them in ways that allow Americans, in his words, “to wrestle with these issues and try to come up with practical solutions.”

White House officials have spent the past few days reaching out to different constituencies, soliciting ideas on possible options for reducing abusive behavior by police officers while also ensuring that officers feel protected and supported while on patrol.

Many black activists, meanwhile, are pressing the administration to take concrete actions to penalize police departments that have come under federal scrutiny for misconduct.

Rashad Robinson, executive director of ColorOfChange, a black political advocacy group, was scheduled to meet with White House officials Tuesday and said that he and others are asking for “real structural reform” by providing federal aid to those police departments that “protect and treat black lives fairly.”

Robinson noted that the Baton Rouge Police Department, one of whose officers shot and killed Alton Sterling last week, had received $3 million in federal money in the past five years despite being subject to multiple investigations for misconduct. He said that while he welcomed Obama’s willingness to speak about the black community’s concerns, “at the same time, what will be lasting beyond words is the type of reform that shifts the relationship, and the incentive structure, between police departments and communities.”

The Rev. Al Sharpton, who has also consulted with top administration officials in recent days, said Obama needs to “trumpet” the need for criminal justice reform, a measure the president mentioned the first time he responded to the shooting of Sterling and Minnesota motorist Philando Castile.

“It will put it right in the middle of a presidential election,” Sharpton said, and could possibly revive a bill that has effectively stalled on Capitol Hill.

Policy prescriptions, however, are likely to have a higher profile during Wednesday’s session at the White House. Obama’s speech Tuesday, Earnest said, will be “appropriate for the setting, which is a memorial service.”

Brittany Packnett, a Black Lives Matter activist and member of the president’s Task Force on 21st Century Policing, said in an interview that Obama could use his remarks as a way to address both the racial inequities that exist today and the concerns police officers have about their own safety.

“What we are talking about is, how do we create a society that replaces order with justice so that violence is not the place where people feel they have to turn,” she said. “So they’re experiencing peace and equity every day of their lives.”