New York City Police Commissioner William J. Bratton speaks at a news conference at Woodhull Hospital following the killing of two New York City police officers on December 20, 2014 in New York City. (Spencer Platt/Getty Images)

In the days since two police officers were fatally shot in their patrol car in Brooklyn, Mayor Bill de Blasio has turned to his celebrity police commissioner for help weathering the biggest political test of his first year in office.

William J. Bratton has often been the featured face of de Blasio’s administration since the shooting, emerging not only as a steadying presence in a nervous city but also as a respected national voice from the officers’ perspective on race and policing.

He brokered a rare meeting this week to reduce the very public tension between the mayor and leaders of the police union, some of whom have blamed the mayor’s past comments on police tactics for the tragedy. He also took to national talk shows to support the mayor and defend the police, arguing that rank-and-file officers and chiefs feel under attack even “from the federal government at the highest levels.”

Bratton, 67, alternates rapidly between pronouncements that represent the interests of the officers he leads and statements of support for the mayor at whose pleasure he serves. Nonetheless, it remains unclear whether he can succeed at repairing relations and, in the process, bolster his reputation as an innovator — one he forged as the city’s top cop under Mayor Rudolph W. Giuliani in the 1990s, before heading west to lead the Los Angeles police for seven years.

“He came back to New York with a lot of credibility,” Ed Mullins, president of the Sergeants Benevolent Association, said of Bratton, whom he described as “filling a vacuum in consistent leadership” in the city. “The members of the NYPD are watching him very carefully.”

New York Police Commissioner William J. Bratton tells graduating police cadets on Dec. 29 that being called a cop is an honor. (Reuters)

In a city on edge after weeks of protests since a grand jury declined to bring criminal charges against an officer in the chokehold death of a Staten Island man named Eric Garner, Bratton is now under political scrutiny very different from the kind he endured during his first tenure as commissioner here, when crack and crime rates dominated the headlines.

Activists across the country — reacting to the fatal shootings of Garner, Michael Brown in Ferguson, Mo., 12-year-old Tamir Rice in Cleveland and Akai Gurley in a public-housing stairwell here — are demanding greater accountability for police who use force, especially against suspects who are black and unarmed. President Obama and Attorney General Eric H. Holder Jr., among others, have urged a reexamination of how officers do their jobs in minority communities.

Bratton’s challenge comes from both inside and outside the police department.

On the one hand, police are preparing for new protests this weekend after the funeral of one of the officers slain last month. On the other, there are signs that the commissioner does not yet have his rank and file in line.

As City Hall announced plans Wednesday to rename two streets in honor of Detectives Wenjian Liu and Rafael Ramos — killed by a gunman who had declared on Instagram that he would kill police as retribution for the deaths of Garner and Brown — new statistics showed a marked drop in the policing of everyday crime, a potentially dangerous act of protest by an angry police force.

The number of summonses for minor offenses and parking and traffic violations plummeted by 90 percent compared with the same week last year, with felony arrests almost 40 percent lower, according to the figures.

The drop in enforcement belied far broader progress here. The statistics showed that the number of homicides here in 2014 — 321, in all — was the lowest in 50 years.

“A lot of why he’s been thrust in the spotlight is because this is New York City,” said Deputy Commissioner Stephen Davis, Bratton’s top spokesman. “Where else can you get 25,000 people on half a day’s notice to have a demonstration? The fact that the police are the object of the protests make this very challenging.”

Many officers remain furious about the mayor’s admonition to his biracial son, after the Garner decision, to “take special care” during any police encounters.

Davis acknowledged that Bratton “has to work with the mayor, he has to work with the cops” and said that “he’s doing a good job balancing that.”

The challenge for Bratton, who has not backed down from his comment that the Dec. 20 killings were a “direct spinoff” of the street protests that followed the lack of criminal charges in the Garner and Brown killings, is to appease not just an angry police department but also a city anxious over aggressive policing.

“At the end of the day, he can’t lose the cops, he can’t lose the community and he can’t lose his mayor,” said Chuck Wexler, executive director of the Police Executive Research Forum, a Washington-based police research think tank. “It’s a toxic environment.”

Experience in Boston, L.A.

In some way it’s familiar turf, as Bratton has made a point of noting in recent weeks.

He was a new sergeant with the Boston Police Department from Irish, working-class Dor­chester in the 1970s when forced busing of the city’s schoolchildren incited daily racial conflict.

Bratton responded to a call about a bank holdup with possible hostages, recalled Wexler, who was an MIT graduate student and police intern at the time. The suspect was black. When Bratton arrived, he lowered his gun and persuaded the man to lower his. Wexler says the incident showed an early understanding of the complexities of race in how police and minorities can work together.

Bratton’s success at finding that common ground was tested in Los Angeles, where as police chief from 2002 through 2009 he was credited with defusing racial tensions, improving morale in a disaffected police department, and winning the support of black and Latino leaders whose communities felt that police were too aggressive.

In Los Angeles, Bratton expanded the stop-and-frisk program, a police practice of stopping residents for what officers determine to be “suspicious” behavior. The tactic was also widely used by the New York police during the administration of de Blasio’s predecessor, Michael R. Bloomberg. It has been opposed by many New Yorkers, who say it disproportionately targets blacks and Latinos.

A federal judge in 2013 called stop-and-frisk a form of racial profiling and ruled that it violated minorities’ constitutional rights. De Blasio’s pledge to scale back the practice and address what he called overreaching by police helped him win City Hall, opening a rift with police that has only worsened.

Bratton has always been known for his frank style and enjoyment of the perks of power and prominence. He and his wife still appear on Page Six, the New York Post’s gossip clearinghouse showcasing the city’s rich and powerful.

But the city he returned to a year ago is a different New York from the one where he led a dramatic reduction in crime under Giuliani starting in 1994. It is, in some respects, a more complicated environment for police, given the heightened sensitivities over the force’s treatment of minorities.

“His biggest challenge is he wants to try to change police culture,” Davis said. “We’ve got the crime thing down, which is strategic and tactical. How to work with each other is in some ways a bigger challenge. It’s an abstract-type thing. The proof will be when the feeling is out there.”

Civil rights activists and police reformers credit Bratton with an openness that they say his predecessor, Ray Kelly, did not show. Bratton disbanded a secretive surveillance unit that spied on Muslim Americans in search of terrorism suspects. He has continued to diversify the ranks of the department.

But he suffered a setback in the fall when a highly decorated police chief and the department’s highest-ranking black official retired rather than accept a promotion that would have made him Bratton’s second-in-command but was viewed as a largely ceremonial post.

“I have not gotten a clear message from Bill Bratton,” said Linda Sarsour, executive director of the Arab American Association of New York, one of several advocacy groups to meet with Bratton over improving relations between police and Muslims.

“I see him trying to cater both to New Yorkers as a whole who support police reform and to the feelings of the police officers,” Sarsour said. “At some point you’re going to have to make a very clear and decisive decision.”

Mixed advice

Conversations with New Yorkers make it clear why Bratton is pulled in so many directions.

In College Point, Queens, an isolated blue-collar neighborhood of industrial parks and garden apartments on Flushing Bay near LaGuardia Airport, the police are on many people’s minds.

“The chief has to put a little bit more lockdown on how he’s managing the police,” said Viviana Acosta, 38, who was heading with her 11-year-old son into a movie theater across from the police academy.

Acosta, who supervises data entry for a pharmaceutical company on Long Island, said the public “would react differently” if Bratton was clearer that bad cops have no place on the force. She has a close friend who just graduated from the police academy.

“I worry for him, “ she said. “There’s been a lot of public lashing out at cops like him who are good cops.’’

Elias Sanchez, a theater usher on a cigarette break, said Bratton “needs to make peace between the mayor and police officers.”

Sanchez said he has watched social media explode with YouTube videos of police officers mistreating suspects during arrests.

“The trust factor is no longer there,” Sanchez said. “When I see a cop, I go to the other side of the street. Who knows? They might be going around with vendettas.”

Yet Paul Meilak worries about the opposite — that tensions with the police department will undermine the city’s substantial progress in becoming a low-crime place.

Meilak, a retired Manhattan narcotics detective who’s now in charge of security for a Radisson hotel in Midtown, said officers are afraid that many of their actions and arrests will be judged as overly aggressive. He’s worried that this is already paralyzing crime fighting.

“You have the potential right now for crime to go up,” he said. “All the majority of New Yorkers want is safe subways and safe streets.”