(CNN) In his six years as police chief, David Brown has endured profound tragedy -- in many different ways.

On Thursday night, a sniper gunned down four of his Dallas police officers and killed another officer.

Shortly after he earned the rank of chief, Brown lost his own son in a police-related shooting -- after his son shot and killed an officer.

As Brown prepares for several police funerals, he faces yet another grueling challenge: trying to lead a grieving department amid anti-police tensions across the country.

"We're hurting. Our profession is hurting. Dallas officers are hurting. We are heartbroken," Brown said. "There are no words to describe the atrocity that occurred to our city. All I know is this: This must stop, this divisiveness between our police and our citizens."

Tough beginnings

The sniper who killed five officers Thursday night was bent on killing white officers, Brown said.

JUST WATCHED Police: Suspect said he wanted to kill white cops Replay More Videos ... MUST WATCH Police: Suspect said he wanted to kill white cops 02:26

What the gunman might not have known was that four of the Dallas officers he killed worked under the command of a black police chief -- one who rose from the challenges of a tough south Dallas neighborhood to become the top cop of the country's ninth largest city.

Growing up in a rough area, Brown understood what it's like for many to have a negative impression of police.

"You stay away from the police in my old neighborhood," Brown recalled to the Dallas Observer earlier this year. "You get the police; you get in trouble."

But after he came back from college in the early 1980s, he saw the crack cocaine epidemic slowly destroying his neighborhood. He couldn't watch his hometown deteriorate.

"I began thinking about law enforcement then," he told the Observer. "I wanted to do something rather than just complain about what was happening."

Photos: Officers shot during Dallas protest Photos: Officers shot during Dallas protest Police respond after shots were fired in downtown Dallas on Thursday, July 7. Five police officers were fatally shot during a protest over recent police shootings in Louisiana and Minnesota. Seven other officers were injured in the ambush, as were two civilians. Hide Caption 1 of 22 Photos: Officers shot during Dallas protest Emergency responders administer CPR to an unknown patient near the receiving area of the Baylor University Medical Center. Hide Caption 2 of 22 Photos: Officers shot during Dallas protest A police officer with Dallas Area Rapid Transit is comforted at the emergency room entrance of the hospital. Hide Caption 3 of 22 Photos: Officers shot during Dallas protest A police helicopter flies over the scene in downtown Dallas. One suspect was killed by police after a standoff that lasted for hours. Hide Caption 4 of 22 Photos: Officers shot during Dallas protest A man raises his hands as he walks near a law enforcement officer in Dallas. Hide Caption 5 of 22 Photos: Officers shot during Dallas protest Protesters gather as police officers arrest someone in the aftermath of the shootings. Hide Caption 6 of 22 Photos: Officers shot during Dallas protest A Dallas police officer takes a moment as she guards an intersection in the early morning hours. Hide Caption 7 of 22 Photos: Officers shot during Dallas protest Dallas police respond to the scene of the shootings. Hide Caption 8 of 22 Photos: Officers shot during Dallas protest Police officers shield bystanders after shots were fired at the protest. Hide Caption 9 of 22 Photos: Officers shot during Dallas protest Police officers take cover as shots are fired. Hide Caption 10 of 22 Photos: Officers shot during Dallas protest Police get in position after gunshots rang out. Hide Caption 11 of 22 Photos: Officers shot during Dallas protest Two officers crouch behind barriers. Hide Caption 12 of 22 Photos: Officers shot during Dallas protest Dallas police order people away from the area after the shootings. Hide Caption 13 of 22 Photos: Officers shot during Dallas protest Police and others gather at the emergency entrance to the Baylor University Medical Center. Hide Caption 14 of 22 Photos: Officers shot during Dallas protest Police stop a driver in downtown Dallas. Hide Caption 15 of 22 Photos: Officers shot during Dallas protest A view of downtown Dallas after the shootings. Kent Giles captured the image and told CNN he "heard multiple shots being fired. Probably more than 20 rounds. This is the intersection of Main and Griffin looking towards the west." Hide Caption 16 of 22 Photos: Officers shot during Dallas protest Dallas police check a car after detaining a driver. Hide Caption 17 of 22 Photos: Officers shot during Dallas protest Dallas police stand watch after the shootings. Hide Caption 18 of 22 Photos: Officers shot during Dallas protest Onlookers stand near police barricades after the shootings. Hide Caption 19 of 22 Photos: Officers shot during Dallas protest Police attempt to calm the crowd after an arrest. Hide Caption 20 of 22 Photos: Officers shot during Dallas protest A clerk looks at broken windows that were shot out at a store in downtown Dallas. Hide Caption 21 of 22 Photos: Officers shot during Dallas protest Law enforcement officials wait outside the emergency room entrance of the Baylor University Medical Center. Hide Caption 22 of 22

So in 1983, he earned his Dallas police badge. Five years later, he suffered his first major tragedy on the force: the on-duty death of his former partner Officer Walter Williams

"When things like that happen and you're really close, you don't believe it for the longest time," Brown told The Dallas Morning News in 2010. "I really relate to all of those in-the-line-of-duty deaths (on a) much more personal level."

But Brown overcame the tragedies and climbed up the ranks of the Dallas Police Department. In 2010, he became the police chief, leading a force of 3,600 officers.

That's when the job got extraordinarily difficult.

A mountain of tragedies

JUST WATCHED Chief praises officers during shootings Replay More Videos ... MUST WATCH Chief praises officers during shootings 01:00

Just weeks after Brown was sworn in as chief, a gunman killed an officer from the nearby Lancaster Police Department and a young father on Father's Day 2010.

The cop killer turned out to be the police chief's son, David Brown Jr.

Lancaster police responded to the scene and fatally shot Brown Jr. more than a dozen times. An autopsy revealed he had PCP, marijuana and alcohol in his system, CNN affiliate KTVT reported.

The newly minted Dallas police chief was at a loss for words.

"My family has not only lost a son, but a fellow police officer and a private citizen lost their lives at the hands of our son," Brown told his department, according to The Dallas Morning News . "That hurts so deeply I cannot adequately express the sadness I feel inside my heart."

New style of policing

JUST WATCHED Police: We won't let a coward change our democracy Replay More Videos ... MUST WATCH Police: We won't let a coward change our democracy 00:59

Despite speculation about whether he would resign, Brown moved forward, charting a new course for the Dallas Police Department.

Mayor Mike Rawlings credited the police department with training in conflict de-escalation techniques "far before cities across America did it."

"We are one of the premiere community policing cities in the country. And this year, we have the fewest police-officer-related shootings than any large city in America," the mayor said. "So we are working hard to improve, and there's always room for improvement. But we are best in class."

Another method emphasized by Brown: community policing, which promotes proactive interaction between officers and residents.

While some critics slammed community policing as a waste of time, Brown insisted that it led to lower crime rates as well as lower tensions between residents and police.

"In my opinion, how can you argue with aggressive community policing if it has yielded the safest the city has been over 86 years?" Brown told the Observer this year.

That emphasis on police connecting with residents was evident just hours before the killings Thursday night. Even while many demonstrators were demanding police accountability, some officers took time to chat with protesters, even taking selfies with them.

"We saw police officers shaking hands and giving high fives and hugging people and being really in the moment with us," demonstrator Sharay Santora said.

Minutes later, the sniper opened fire on police protecting the crowd. Four Dallas police officers and a Dallas Area Rapid Transit officer were killed. Is was the deadliest assault on U.S. law enforcement since 9/11.

Thanks for a thankless job

One day after the deaths, Brown addressed a massive crowd of supporters gathered in the city's aptly named Thanksgiving Square.

Incredible turnout came in support of our officers. pic.twitter.com/ofEy7QX5k5 — Dallas Police Depart (@DallasPD) July 8, 2016

"In the police profession, we're very comfortable with not hearing 'thank you' from citizens ... who need us the most," the chief said.

"So today feels like a different day than the days before this tragedy, because you're here. Because Dallas is a city that loves."