De Blasio and Bratton at the police-promotions ceremony on December 19. Photo: Mark Peterson/Redux

It’s late afternoon on Friday, December 19, and Police Commissioner Bill Bratton is surprisingly serene. Fourteen floors below his office at One Police Plaza protesters are massing, once again, to block the entrance to the Brooklyn Bridge. They’re chanting, “Hey, ho! Racist cops have got to go!” as a smaller, pro-cop rally starts to gather directly across the street. In the waiting room outside Bratton’s office, the flat-screen TV tuned to NY1 is playing and replaying cell-phone video showing an NYPD plainclothes cop punching a suspect as he is being handcuffed.

Bratton is concerned, certainly. Yet he remains visibly unruffled, reclining in a leather armchair. A puppet replica of his late great sidekick and co-strategist, the former deputy police commissioner Jack Maple, is propped on a shelf. Yes, Bratton says, in hindsight it was probably a bad idea to sit on one side of the mayor with the Reverend Al Sharpton on the other at a City Hall press conference back in July, after the death of Eric Garner. True, his first year back atop the NYPD has been stressful, particularly in the past month. Two weeks ago, on the afternoon a Staten Island grand jury announced it would not indict Officer Daniel Pantaleo, the cop who had wrapped his arm around Garner’s neck, Bratton was briefly hospitalized for dehydration.

The fresh Garner controversy came against the backdrop of the “fraying” relationship between cops and community that he inherited, Bratton says: “Commissioner Kelly and Mayor Bloomberg seemed to be somewhat tone-deaf that stop, question, and frisk was causing a lot of growing tension.” Now the protests have taken their own toll. Morale in the NYPD is not good, and he knows it’s a serious problem that his officers feel besieged. The media haven’t helped, Bratton says, with their portrayals of his boss, Mayor Bill de Blasio. “The New York Post hates him with a passion,” he says. “If the cops are reading the Post, they’re not going to like the mayor, because it’s hanging the mayor 24 hours a day.” Not that he thinks the other side of the ideological-­journalistic aisle has been much better: “The New York Times doesn’t particularly like him because he’s not far enough to the left for where they want to be. Most of the cops aren’t reading the Times in any event — they just see it as the enemy because it’s been leading the charge on the racial profiling and the allegations of racism.”

All the phony controversies, Bratton insists, misrepresent de Blasio: “This guy’s heart is in the right place. He likes cops. He appreciates what they do.” Six days earlier, two officers were attacked and injured during a protest on the Brooklyn Bridge. Did the mayor visit them in the hospital? Bratton’s temperature and volume rises. “Anytime a cop’s injured, he calls me to get their number. He’s come to the hospital with me. Let’s stop the bullshit.”

But the moment passes quickly. Despite all the turmoil, the department has kept crime at historic lows, and Bratton says de Blasio has given him an extra $200 million to spend on retraining and technology, so next year will be even better. “The test of leadership is in crises, not when things are running very well,” he says. “Look at the crises that have occurred here this year. They’ve been dealt with without the place going up in flames.” He smiles. Sure, it’s been a tough stretch, but Christmas is right around the corner.

The corner of Tompkins and Myrtle Avenues the day after officers Rafael Ramos and Wenjian Liu were shot and killed. Photo: Anadolu Agency

Less than 24 hours later, the city was aflame, at least emotionally, and Bratton’s eyes were brimming with tears. Two cops sitting in a patrol car in Brooklyn had been shot and killed by a gunman who then shot himself. Rumors were swirling that the killer’s Instagram postings said he was motivated by the deaths of Michael Brown and Eric Garner. As de Blasio and Bratton entered a press conference at Woodhull Medical Center that night, moments after meeting with the heartbroken families of officers Wenjian Liu and Rafael Ramos, cops lining the hallway turned their backs on the mayor and his commissioner in a stunning act of disrespect. An hour later, the ugliness escalated, with the Patrolmen’s Benevolent Association president, Pat Lynch, roaring that de Blasio’s lenient treatment of demonstrators was to blame. “There’s blood on many hands tonight,” he said, standing on a hospital ramp just after the ambulances carrying the bodies of Liu and Ramos pulled away. “That blood on the hands starts on the steps of City Hall, in the office of the mayor.”

It was an outrageous claim. But Lynch’s diatribe played on anger in the ranks that had been building, even among the many fair-minded cops, since the 2013 campaign, abetted by a contract stalemate between the city and the PBA. Now, in the aftermath of the shootings, the combination of grief and grievance threatened to eclipse not just de Blasio’s first-year accomplishments but his next three years in office.

Until December, the mayor had been heading to a mostly upbeat finish to his rookie year. He cruised into office with 72 percent of the general-election vote, promising to lead a progressive crusade, and is indeed tugging New York leftward on social and economic policy, from wages to immigration to speed limits. He started 2014 in a protracted public wrangle with Governor Andrew Cuomo and emerged bruised but with $300 million in state money to expand the city’s prekindergarten programs, delivering on one of his main campaign promises. He has since negotiated union contract deals with more than two-thirds of city employees, combining raises with medical-benefits changes that could end up saving the city millions of dollars. His administration’s preparation for an Ebola case was impressively thorough, and the mayor’s response to the city’s lone patient was nimble.

But those victories have come with a growing recognition of the complicated necessities of keeping the city running efficiently — and of tending to the old-­politics power realities. So, for instance, de Blasio’s vow to create or preserve 200,000 units of affordable housing has meant not running afoul of the real-estate developers he needs to build those apartments.

His dealings with Bratton and the NYPD are a crucial case in point. The tragedy in Bed-Stuy highlighted the high-wire act that came to define de Blasio’s first year in City Hall and also the challenges he faces in fulfilling his populist pledges while maintaining the city’s stability. In 2013, de Blasio’s campaign flayed the NYPD’s overuse of stop and frisk. That helped him win the election, but it left much of the rank and file feeling as if they were being blamed for all the evils of racism. The Garner protests have bred more skepticism and bitterness toward de Blasio within the Police Department. Yet the same cops for whom he’s mandated retraining are the ones the mayor needs to keep crime low. De Blasio’s goal is to fundamentally change how his officers police without undermining Bratton and alienating the force. The mayor’s first year has been about learning how to walk that line. And lately he’s been lucky to have a strong partner to lean on when he stumbles.

Outside City Hall on December 19, where protesters and supporters of the NYPD faced off. Photo: Mark Peterson/Redux

They don’t seem like natural allies. Bill Bratton, 67, became internationally famous as the tough-guy police commissioner for tough-guy Republican mayor Rudy Giuliani, cleaning up the city in the early ’90s with a combination of computer crime tracking and an aggressive crackdown on low-level, “quality of life” offenses like fare-beating, a cluster of tactics given the catchy name “broken windows.” Bill de Blasio, 53, spent his formative professional years as a left-of-center operative in Democratic politics, then won an upset victory in last year’s mayoral race by championing the city’s have-nots; a sizable portion of his political base believes “broken windows” is inherently racist. When Bratton was a young beat cop in Boston, he policed civil-rights and antiwar demonstrations in which de Blasio could have easily been a protester. (“No, I would have noticed him, he’s so tall,” Bratton says with a laugh.) These days, Bratton spends his off-duty time with one-percenters who he says disdain the mayor; de Blasio’s downtime is more likely to be spent sweating in souvenir T-shirts at the Park Slope Y.

But both men are deeply ambitious, and two years ago they found themselves with overlapping needs. Bratton, even after more than six successful years as chief of the Los Angeles Police Department, yearned for a second shot in New York, a chance to erase the bad ending of his first tour at One Police Plaza, where Giuliani chased out Bratton for stealing the spotlight. De Blasio, the lefty long shot, saw in Bratton not just a proven crime-fighter but a man who could cover for him with the city’s Establishment. And both wanted to show they could bridge the divide between cops and minority New Yorkers.

There have been firestorms (over the cop-bashing boyfriend of Rachel Noerdlinger, de Blasio’s wife’s chief of staff) and setbacks (the accidental shooting death, by an East New York housing cop, of 28-year-old Akai Gurley). But the mayor and the police commissioner were still making steady headway in some ways, driving down both the number of stop and frisks and the number of homicides. And when their biggest test loomed, the release of the Garner-grand-jury decision, they tried to get ahead of the trouble. The mayor rolled out announcements of declining crime statistics and plans to equip cops with body cameras earlier than originally intended.

On December 3, when the grand jury decided against indicting Pantaleo, de Blasio traveled to Staten Island to meet privately with aggrieved family members and community leaders. Then he delivered an impassioned speech in a church. Back at City Hall, the mayor’s aides were closely monitoring social media for reaction, poised to promote the speech’s themes on Twitter with an assortment of hashtags. But then they saw that de Blasio’s use of the slogan “Black lives matter” in the speech registered with viewers organically and attached to positive tweets.

Many cops, and mainstream media outlets, picked up on a different passage: de Blasio’s description of “training” his son, Dante, to be wary of encounters with police officers. The mayor’s empathy was appropriate. But de Blasio, in his Staten Island speech, missed an opportunity. If he had gone on to talk about how thousands of teenagers, black as well as white, are able to walk home safely at night thanks to the NYPD, he might have won the respect of cops who were looking for de Blasio to be a passionate mayor for the entire city.

Instead, on December 12, Lynch, the PBA boss, launched an inflammatory campaign to ban de Blasio from any future NYPD funerals. The next night, two cops on the Brooklyn Bridge were attacked and injured, sending one to the hospital with a broken nose. This was a turning point in the protests that had been weaving and splintering their way through city streets, peacefully if noisily, for almost two weeks. Two days after the bridge mess, Bratton had vouched for de Blasio, testily declaring that the mayor “misspoke” in describing the assaults as “alleged.” Then Bratton went on to not-so-subtly pressure de Blasio to start making an effort to wind down the protests by declaring that they’d cost the city $22.9 million in overtime and were becoming “a significant drain on the manpower of the city.”

Photo: Mark Peterson/Redux

The next afternoon, four days before the shootings in Bed-Stuy, the mayor is just getting off the phone with Bratton. The police commissioner had described the briefing he’d just completed, over at One Police Plaza, which included unveiling photos of the seven people wanted in the Brooklyn Bridge attacks. On his end of the conversation, the mayor told Bratton of his plans to meet with members of the Justice League NYC — not the team of comic-book super­heroes but a group of protest leaders.

De Blasio steps from behind Fiorello La Guardia’s old desk and settles into a red upholstered chair. In front of him is a table piled with policy binders, family photos, and newspapers — the clutter looks as if it had been transferred straight from his cramped family home in Park Slope. He’s jacketless, in white shirtsleeves and a red tie with gold dots, and does his best to sound relaxed. “I think I’ve always felt a sort of familiarity and a comfort in the relationship with him just on a human level, just a human connection, in part because we come from some of the same reality,” de Blasio says of Bratton. “It was always clear to me that we would be philosophically kindred.”

For all the personal bonding and professional teamwork, though, the way he and Bratton have handled the tumultuous end of 2014 has been driving down de Blasio’s job-approval ratings — and opening a huge racial split — in public polls. The mayor brushes off the validity and importance of those surveys. Does his own polling show anything different? “I am not,” de Blasio says sharply, “getting into my own polling.”

He is, however, unrestrained in defending the speech he’d given on the day of the Garner decision and says its description of his warnings to Dante has been distorted. “I’ve tried to do a lot this year to support the police, to support the commissioner, to support the department. Throughout that whole process, I didn’t hear people saying we’re concerned about what you said about your son very openly last year,” the mayor says. “The way [Garner] died, his voice, his family, what we learned afterwards, I think it left just a deep, searing pain for so many people. And so what I wanted to say was that I understood in some form what people were feeling and that I was committed to the changes we needed. People were searching for a direction, and that’s what a leader is supposed to do, provide some sense of where we’re going and some sense of solace, and so I’m very comfortable with what I did.”

Beyond the uproar over the NYPD there has also been, in New York’s business and cultural communities, a growing sense that de Blasio is indifferent to important sectors of city life. “If it doesn’t fit in the inequality bucket, he’s not interested,” a banking executive says. Some of that feeling is, as one real-estate executive puts it, “a Bloomberg hangover” ­— after 12 years of their being lavished with attention, the shift in focus to the city’s marginalized has been disorienting for the elites. But there’s more at work than the whining of Wall Streeters. Even Democrats sympathetic to the mayor’s policy objectives have been disappointed by what they believe is his limited range. “He sees the world through the lens of the people he has to make happy — this narrow world of Democratic-primary politics,” a strategist says. “Yeah, you’re gonna get reelected, but you’re not going to be a good mayor if you’re governing for 10 percent of the city.”

De Blasio bristles at the suggestion that his words on Staten Island, and his larger agenda, are pitched solely to his political base. “Well, nothing could be farther from the truth,” he says, leaning forward, his jaw clenched. “I think the facts are a vast percentage of our population will qualify for the affordable-housing program. The universal pre-K program was universal. I’ve spoken to upper-middle-class parents who have benefited, and I’ve spoken to several of the lowest-income in the city who have benefited. I think we’ve been able to drive down crime in a lot of major categories. That affects everyone. People across the board wanted to see reform of stop and frisk. I mean, we’re executing the platform. This is what we came here to do. It is still about the tale of two cities. It’s about healing that and changing that and creating actual material change in people’s lives.”

Now, though, de Blasio’s challenge is governing a city where millions still haven’t made up their minds about him — while trying to regain the trust of his Police Department.

One hundred and eleven cops are smiling. They have good reason to be happy, early on the afternoon of December 19: They’re in full-dress uniform, surrounded by proud family members, marching into an auditorium at One Police Plaza to be promoted to detective. The NYPD band is playing “Louie Louie.” Then a stirring video, A Day in the NYPD, is projected onto three massive screens hanging from the ceiling. It’s full of scenes of cops shaking hands with grocers, strapping on bulletproof vests, and keeping a benevolently watchful eye over the city.

Before their names are called —­ Algabyali and Espinal and Yoon as well as McAloon and Vitello, a vivid illustration of the inspiring ethnic diversity of the modern department — and their detective certificates distributed, the cops listen to speeches. First up is the mayor, whose schedule today is a reminder of the straddle de Blasio is attempting: This morning was his meeting with leaders of the Justice League, and now he’s addressing the people the Justice League has been protesting.

De Blasio says all the right words in his speech to the rising detectives, and he no doubt believes what he’s saying. “Any act of violence against our police officers is an act of violence against our values,” he says. “On behalf of all 8.4 million New Yorkers, I want to thank you.” Yet his manner is deferential instead of commanding. He stands with his left hand in his pants pocket, and there’s little sense of personal connection with his audience. It’s Bratton, up next, who stirs spirits.

An hour later, up in his office, I ask the police commissioner about another speech he gave recently, at the Association for a Better New York, in which Bratton laid out a strong defense of “broken windows” policing. “Stopping small things before they get big is essential,” Bratton had told the business group. Wasn’t he, unfortunately, proved right on the Brooklyn Bridge? Hadn’t weeks of managed disruptions led to worse behavior, the attacks on his officers? “It hasn’t led to worse behavior, except among a small group that was intent on creating behavior because there was not enough happening,” Bratton says. Right, but isn’t that the point of the anti-crime theory to which he’s deeply loyal, that if minor disorder isn’t addressed, it inevitably grows? Not in this instance, he argues. “If anything, that was the frustration: that there was not enough police misbehavior, because what they want to do is provoke misbehavior, and it wasn’t happening. So it’s not a contradiction with ‘broken windows.’ Policing is all about situation. You police to the situation.”

Bratton clearly recognized the urgency of the situation after the shootings in Bed-Stuy. He went on the Today show and said the murders were “a direct spinoff” of the protests. It was a highly charged statement, but it appeared to have the desired jolting effect: Six hours later, at a Police Athletic League lunch, de Blasio called for a temporary moratorium on protests. Behind the scenes, Bratton brokered a time-out with union leaders. The combination may provide a chance for the mayor to lower the rhetorical heat and for Bratton to shore up his credibility inside the NYPD. City Hall and One Police Plaza insist the two men are closer than ever. But the mayor is emerging from this drama even more dependent on his police commissioner.

In the longer run, the risk for Bratton is that cops become cautious, unwilling to take the risks that keep everyone safe because they’ll be villainized for any mistakes. Bratton says he hasn’t seen any evidence that cops are on their heels. Besides, he’s lived through worse racial animosity, back in the hometown that formed both him and de Blasio. As a young cop in Boston in the ’70s, Bratton witnessed the vicious reaction to forced desegregation of the schools, especially in Dorchester, the blue-collar Irish-Polish neighborhood where he grew up.

“You wondered, How could this ever get better?” he says. “Attitudes have changed dramatically. The Boston experience makes me very optimistic about dealing with the issues we’re dealing with now.” He says that the brutal murders in Bed-Stuy, and the war of words with the unions, won’t make it more difficult to achieve the vision he and de Blasio have set out — of a fairer, safer city for everyone. “Not at all,” Bratton says two days before Christmas, as he prepares to head to Boston to visit his 89-year-old father. “If anything, it’s moved things back to the center. There was a very heavy leaning of momentum toward the demonstrations. Now that this awful tragedy has occurred, it’s kind of changed some of the dynamics of the discussion. It’s allowed breathing room for the issues with the union and the mayor, even with the demonstrators. I’m optimistic that out of this we’ll find some degree of common ground. There really is no other option, is there?” The city has to hope Bratton is right. Though it says a great deal about the volatility of the current moment that anyone would think a comparison to the 1970s is reassuring.

*This article appears in the December 29, 2014 issue of New York Magazine.