James A. Gagliano is a CNN law enforcement analyst and a retired FBI supervisory special agent. He also is an adjunct assistant professor at St. John’s University in Queens, New York. Follow him on Twitter: @JamesAGagliano. The views expressed in this commentary are his own. View more opinion on CNN.

(CNN)The past 18 days have been exceedingly perilous for American law enforcement.

2019 thus far has seen 73 law enforcement line-of-duty deaths — 30 by assailant gunfire. And recent shock-the-senses mass shootings involving gunmen outfitted in ballistic vests and armed with semi-automatic rifles in Gilroy, California; El Paso, Texas; and Dayton, Ohio, provide stark realization that our world is inherently dangerous and that the men and women who swear an oath to protect and serve are heroes.

Policing is a perilous pursuit. But not all suffered wounds result in torn flesh and are visible to the naked eye. The New York City Police Department just recorded its ninth suicide this year. It’s a difficult time to be a cop. Scrutiny of police actions has led to harsh criticisms — some fair and some rife with enmity and mischaracterizations.

But neither the associated physical dangers nor 20/20 hindsight critiques deter our protectors.

    A crystalline example unfolded Wednesday during service of a drug warrant in the Nicetown-Tiago neighborhood in North Philadelphia. The enforcement action quickly devolved into an exchange of gunfire between police and a gunman that left six cops wounded and two pinned down for hours inside a rowhouse. The tense standoff proves, yet again, that America’s finest still has the mettle.

    The Philadelphia standoff dragged on for nearly eight hours and ended only when the suspect, whom police identified as Maurice Hill, a convicted felon with a lengthy list of arrests, was able to speak with his lawyer, Shaka Johnson, who appealed for a peaceful resolution to the ordeal. Philadelphia Police Commissioner Richard Ross lauded the heroism and professionalism of his SWAT officers. The tactical unit was instrumental in extricating the trapped cops, as well as four women who were escorted to safety.

    One of the rescued women relievedly said of the cops who were pinned down with them, “They kept us safe the whole time, the whole time, they kept us safe.” This a perfect juxtaposition to some members of the gathered crowd who reportedly taunted, laughed at, and pelted the on-scene officers with debris while they were taking cover from the barricaded suspect who continued to rake their positions with gunfire.

    But the police who went to serve that drug warrant undoubtedly never joined the profession for accolades, commendations or public acknowledgments. The vast majority of those drawn to the job are inclined to act as sheepdogs, protecting a flock from the predators and evil in our midst. And police are certainly as imperfect as the rest of us. They are fallible human beings forced to make split-second, consequential, life-and-death decisions in real time, bereft of 20/20 hindsight and slow-motion videotaped reviews.

    Dousing cops with water is assault and should be treated that way

    Self-doubt or fears of post-incident hyper-scrutiny can have a deleterious effect on officer safety. And that doesn’t mean that we shouldn’t demand our law enforcers make reasonably objective, sound decisions. After all, they act as armed instruments of the state and possess the power to take lives and deprive us of freedoms.

    Philadelphia is certainly no stranger to police missteps, either. One need only to recall the department’s fateful decision in May 1985 to drop an incendiary device containing, among other explosive components, C-4 on the rooftop bunker of the black liberation group MOVE in West Philadelphia. The device ignited a fire that led to 11 deaths in the communal dwelling, including five children. More than 60 neighborhood homes were also destroyed in the resultant inferno.

    Though the decision was supported by Philadelphia politicians, including Mayor W. Wilson Goode, it has shaped the department’s decision-making and training across the ensuing decades.

    So when it was determined that the shooter was a barricaded-subject and not a barricaded-subject-with-hostage(s), Philadelphia police made the right call to employ patience and wait this one out. Eight hours is a seemingly damn long time to leave a man who has injured six cops and initially refused communication efforts to his own devices. As I watched the drama unfold on television, my training and experiences as an FBI SWAT team leader and crisis management coordinator for its New York City Office kicked into overdrive. How would this play out?

    Police needed to establish an impenetrable perimeter — making it wider than usual, with knowledge that shooter was armed with a rifle. They also needed to provide critical information to the press and the public. They did that in a timely fashion, as well. And then, no less important, they needed to assemble the right on-scene personnel resources of incident commander, tactical resolution team, uniformed perimeter positions and crisis negotiators.

    From what I observed, they satisfied these requirements and then some. There is no such thing as a “routine” execution of a felony warrant.

      Drug traffickers understand that stiff sentences typically attach once they are arrested and prosecuted. That makes them more desperate — and dangerous. And someone who is inclined to shoot it out with police, intending to kill those who are dispatched to bring him into custody, is the epitome of a nothing-to-lose wild card. This incident very well could have turned out far worse, replete with multiple police funerals and potential innocent neighborhood casualties. And instead, it was handled to perfection.

      Well done, Philadelphia Police Department. You exemplified what the profession is about. And you placed an exclamation mark on what has been 18 days for law enforcement of unwavering commitment and courage in answering duty’s call.