By RAY FLYNN

About halfway through the funeral Mass for longtime Hub firefighter and union leader Mike Mullane, police Commissioner William B. Evans could be seen hurriedly making his way through the capacity crowd.

As Evans, who had been sitting in the front of Dorchester’s St. Brendan Church with Mayor Martin Walsh and fire Commissioner Joe Finn, made his way for the door, I whispered to my wife: “A cop must have been shot.”

I don’t know how many other people in the church had the same thought, but in understanding the extreme dangers of being a police officer in today’s day and age — it was sadly the first thing I thought of.

Just before the final message, Fr. Richard O’Donnell requested that we all say a prayer for the Boston police officer who was just shot a short distance away in Dorchester. After the moving service, we had the chance to talk to many other public safety champions, including former fire Commissioner Leo Stapleton.

As I listened to these dedicated men and women, I found myself telling a couple of Dorchester neighbors how fortunate we have been to have so many dedicated public safety servants on the job in Boston over the years. People like Stapleton, Mullane, Marty Pierce, Paul Christian, Mickey Roache, Paul Evans, Johnny Jennings and Bob Hayden, just to name a few.

While speaking with a police officer, who filled me in on what the brazen, daylight shooting in Dorchester was all about, they pointed out that every day is an uphill battle because of the never-ending avalanche of deadly drugs pouring into American cities.

We can only pray that our political leaders will make the necessary changes to stem the tide.

The fact is our southern borders are still wide open and very little is being done to curb the flow of drugs and guns from pouring into our country.

But when a police officer is accused of excessive force, antipolice activists immediately come out of the woodwork to criticize them and demand that they be prosecuted — even before all the facts are known.

I’m glad we live in a city where the citizens and our elected officials line up to support our brave public safety responders.

We know the families of these dedicated cops and firefighters, including the brave drug officer who was shot in the line of duty yesterday. We know of their integrity and professionalism. And as we did (Friday), at Mullane’s Celebration of Life, we proudly stand with their families.

Let’s do something special in Boston this year.

When we see a police officer or firefighter on the job, make a point to say: “Be safe and thank you.”

Ray Flynn is the former Mayor of Boston and U.S. Ambassador to the Vatican