Paul Monteiro saw the reports on social media — unrest over a black man killed at the hands of police in Baton Rouge — and quickly got on the phone with his regional director in Texas.

“What can you tell me?” he asked. “What more have you learned that can inform how we sort of figure out our response?”

The situation was serious. Protests and community meetings were being organized rapidly. Police clad in riot gear would soon be deployed to meet them. Monteiro, the head of the Justice Department’s Community Relations Service, dispatched someone immediately to Louisiana to help keep the peace.

“The sooner we can get on the ground,” he said, “the better.”

The function is not an especially well publicized one, but when civil unrest threatens to turn violent across the country, the Justice Department has a small team of mediators across the country whose job is not to investigate or prosecute, but to ease tensions. They were on the ground in Selma, Ala., communicating with Martin Luther King Jr. and law enforcement officials about how far demonstrators would be able to progress and what response they would receive when they marched to Montgomery.  They were in Los Angeles after a jury acquitted the police officers caught on tape brutally beating Rodney King, working with community leaders and even gang members to calm the anger that produced riots.

They were sent to Ferguson, Mo., in 2014 after demonstrators took to the streets to protest the shooting death of 18-year-old Michael Brown. There, the Community Relations Service tried to train protest leaders to keep their gatherings peaceful and helped establish a coalition of community leaders, law enforcement officials, faith leaders and others to discuss the underlying problems generating discord between residents and law enforcement, according to the Justice Department. They played a similar role in Staten Island after the death of 43-year-old Eric Garner in police custody, according to the Justice Department.

The service — established in 1964 as part of Title X of the Civil Rights Act — has just 45, full-time government employees, including 10 regional directors at offices spread throughout the country, Monteiro said. By law, it is supposed to “provide assistance to communities and persons therein in resolving  disputes, disagreements, or difficulties relating to discriminatory practices based on race, color, or national origin.”

In practice, Monteiro said, that means helping protesters with logistical matters, like acquiring permits, providing information to quell false rumors, and trying to bring opposing sides together for at least a conversation. The hope, Monteiro said, is that talking can “provide nonviolent off ramps to the community so they understand there are lawful and non-violent ways to express righteous indignation.”

“There’s a lot of work that goes into getting people to the table,” Monteiro said.

Monteiro acknowledged the service is not universally well-received, and they “can’t impose” their will on those they work with. Two leaders in the Black Lives Matter movement said they had not heard of the service, though one said she might have interacted with them in Ferguson not exactly knowing what their function was.

In Baton Rouge, where 37-year-old Alton Sterling was shot and killed as two officers tried to take him into custody, Monteiro said the service’s representative tried to quickly plug in with community leaders and see what vigils or meetings she could assist with. He said when reports emerged about the shooting death of 32-year-old Philando Castile by a police officer Falcon Heights, Minn., the service dispatched two mediators to ease tensions there.

Under Attorney General Loretta Lynch, the Justice Department has tried to mend relations between residents and police, even as it investigates officers for alleged misconduct. The department has opened major pattern-or-practice civil rights investigations of the Chicago and Baltimore police departments and has negotiated consent decrees with several others, requiring local leaders to implement significant and sometimes costly reforms. It has also pressed changes through its Community Oriented Policing Services Office, which offers funding and training to police departments to advance best practices in policing — and the Community Relations Service.

The country, though, undeniably remains on edge — particularly after five law enforcement officers in Dallas were shot and killed by a man who said he was out to kill white police officers, and three officers in Baton Rouge were gunned down on Sunday by a man who posted extensive YouTube videos about violent revolution against authorities. Just as protests have erupted across the country over law enforcement’s treatment of black people, police have pointed to a number of incidents that they say shows the dangers of their job.

“Tensions are hot,” said Ron Davis, who directs the Community Oriented Policing Services Office.” I think it would be naive to think that they’re not.”

The Justice Department’s Civil Rights Division is investigating Sterling’s death, and department officials are monitoring the local probe of Castile’s. That division works closely with the Community Relations Service and Community Oriented Policing Services Office, though their functions are different.

Monteiro said the Community Relations Service has been somewhat challenged by the recent protests, in part because those involved say “no one speaks for someone else,” and it can be difficult to identify leaders with whom to talk. But he said such groups are the service’s “new clients,” and it is important that they have a line of communication to police and government leaders.

“Unless you can get people these off ramps, they’re going to say like there’s only one way to go here, and that’s a lose-lose situation,” he said.