BUFFALO, N.Y. (WIVB)- Buffalo Police have a new, specialized team trained to keep the peace during civil disorder.

“There’s a very fine line between policing and honoring people’s civil rights,” said Lt. Thomas Whelan, the commander of the Emergency Response Team (ERT).

Lt. Whelan is a veteran of the U.S. Marine Corps. He’s training officers who have anywhere from four to thirty years policing experience.

“To move people, keep avenues open and remove protesters that are there to disrupt other people’s rights,” said Lt. Whelan.

News 4 watched dozens of officers run drills on how to hold a line and move a crowd. The unit is practicing to make sure that line isn’t crossed.

“Training, the more training the better,” said team member Officer Kenneth Agee. “You can never learn too much.”

It’s taken two years to get the ERT in place.

In the wake of the unrest in Ferguson, Missouri after the 2014 fatal shooting of Michael Brown, Buffalo Police did a self-evaluation and found it lacked a unit to respond to a mass demonstration.

“We were not trained appropriately, we were not equipped,” said Lt. Whelan. “It’s been a large process trying to buy equipment, identify equipment.”

Buffalo Police applied for the FEMA Field Force Operations course through the U.S. Department of Homeland Security in 2014. Due to the high number of law enforcement agencies seeking the training, it took until September 2015 to complete it.

Lt. Whelan told News 4 that for two weeks at the Erie County Fair Grounds, agency commanders and officers learned how to prevent protests from escalating while respecting the right to demonstrate.

The officers on this team did have to meet certain physical standards and then were selected by seniority, said Lt. Whelan. He told us about half of the team members have military experience.

They were also trained alongside other agencies from across Western New York so they can respond to mass demonstrations as one, larger team.

“There were members of the Sheriff’s Department, Town of Tonawanda, Amherst PD, just to name a few,” said Lt. Whelan.

The agencies were in action at the rally for presidential candidate Donald Trump. Protesters were given a place to demonstrate apart from Trump’s supporters. Buffalo Police, State Police and the Erie County Sheriff’s Department held a line in between. When protesters stormed the Metro Rail line, the ERT moved them back.

“Everyone has the right to be for or against a cause but at the end of the day we want everyone to respect each other’s opinions and differences and safety,” said Officer Agee. “Overall safety, we want everyone to get home safe.”

There was a clear difference in the response to the rally for Donald Trump and demonstrations in December 2014, where some of the officers came face to face with protesters over racism, police brutality and the militarization of police. News 4 archive footage shows Lt. Whelan responding to that event.

The City spent about $30,000 from the Buffalo Police Department budget for the ERT’s armor and equipment.

“We don’t show up at every event dressed as these officers behind me, we show up just like the normal police show up,” said Lt. Whelan.  “As the event, and things in the event, are elevated then we elevate our posture. I just want compliance, that’s the name of the game.”

FEMA told News 4 the Field Force Operations course has been available since 2004 and 2,744 agencies have at least one representative trained in it. There are 206 agencies trained in New York State.

Buffalo Police told News 4 the nature of their job has changed.

“Due to social media, now something happens in one city, it spreads like wildfire online and becomes kind of the next thing to do in another location,” said Lt. Jeff Rinaldo.

Lt. Rinaldo said it’s increased the need for a specialized team like this, which is on call 24-7.

“Where in the past, the response might have been a lot less in terms of manpower that you would deploy to a situation, it was probably much more reactive,” said Lt. Rinaldo. “I think, at least in our philosophy, we’ve chosen to be much more proactive in our response.”

Officer Agee told us it has increased officer safety.

“That sense of confidence that you’re probably trained on how to deal with situations and the guys on your left and right side of you have the same training, so being able to work in different environments and be fluid with one another,” said Officer Agee.

All of these officers volunteered for the team and Agee said their goal is protecting the public.

“At the end of the day we’re here for them, just here to make sure everyone is safe,” said Agee.

Mayor Byron Brown said the team is getting a positive reaction nationwide, following the rally for Donald Trump.

“Buffalo has been held up as a model across the nation for how other communities could handle mass demonstration, mass mobilization, masses of people,” said Brown.