Hundreds of people filled the pews at St. John Catholic Church in Bangor on Sunday for the annual Blue Mass, which honors local police officers, firefighters and other public safety officials.

Blue Mass, named for the blue uniforms worn by public safety officials, dates back to the 1950s, Bishop Robert P. Deeley said. It became an annual event in Maine after the terrorist attacks on Sept. 11, 2001. It was last held in Bangor in 2009. Since then, it has been held in either Portland or Lewiston. Next year, it’s slated to be celebrated in Caribou.

Congregants in attendance for Sunday’s service included Republican Sen. Susan Collins and U.S. Rep. Bruce Poliquin.

During the service, Bishop Deeley pointed out that it is important for communities to be thankful for public safety officers at all times, and not just when they are needed most.

“We do not need to wait until a disaster strikes to be grateful,” he said.

Deeley called attention to the public safety officials in Florida who, at that very moment, were mobilizing and responding to those affected by Hurricane Irma.

Deeley lauded those who devote their lives to protecting others. He also emphasized the importance of contributing to one’s own community, and how the onus falls on everyone to overcome the pervasive “opposition and hostility” that many in law enforcement face each day.

Bangor Police Chief Mark Hathaway said that local departments had been working with the diocese to plan the events for the past couple of months.

“While we think of the first responders and all other people impacted by Hurricane Harvey and Hurricane Irma, we are grateful to Bishop Deeley for having the Blue Mass ceremony here in Bangor this year,” Hathaway said after the service.

The Rev. Frank Murray, pastor of St. Paul the Apostle Parish, which is made up of churches in Bangor, Brewer, Hampden and Winterport, said he was “thrilled” to have the event back in his neighborhood.

“The environment that we celebrated the Mass in today was certainly spiced up [from most Sundays] with the emergency vehicles, with [a] huge American flag flying over the street so that cars could drive right under it, with all the emergency personnel dressed up in their finest added to the liturgy. To be able to have a secular ritual combined with a religious ritual works very well.”

“The support in Maine is overwhelming,” Bangor Police Department Sgt. John Robinson said outside the church.

Robinson, who has been with the Bangor police force for 21 years, said the community has treated the department “wonderfully.”

Kennebunk Police Department Deputy Chief Michael F. Nugent echoed Robinson’s sentiments about the support that local departments receive from Maine residents.

“I really do think that the bulk of people are very supportive,” said Nugent, a retired Army veteran.

Nugent and other members of the Maine State Police Pipe and Drum Unit volunteered their time to perform before and after the church service.

“It’s our way to give back to those who sacrificed their lives,” said pipe and drum unit member Clancy Corbett, who also is an Army veteran.

As the service concluded and congregants emptied into the street, Corbett, Nugent and the rest of their musical group performed “Amazing Grace” under a billowing American flag hung between two firetruck ladders.

“I think we often forget the importance of the work that they do,” Hampden resident and St. John’s parishioner Jason Lyons said of first responders.

“We are able to pay attention to the simple things in life because they take care of the big ones for us.”

BDN writer Judy Harrison contributed to this report.