Working a recent demonstration against the Dakota Access pipeline, some Minneapolis police officers were greeted with a word not often heard at a protest: Thanks.

As hundreds of protesters began their march across the Lake Street Bridge, officers on bicycle and on foot buzzed back and forth, redirecting traffic to clear the way for the procession. None wore armored helmets or carried batons.

Instead of angry confrontations ending in arrests, protesters proceeded unhindered, and expressed gratitude.

"@MinneapolisPD Thank you for your calm professionalism while the protest played out," read one tweet. Someone else tweeted: "@MinneapolisPD Great job yet again! Keep it up!"

At a time when lawmakers in Minnesota and other states want harsher penalties for disruptive protests, the Minneapolis Police Department has moved in the opposite direction.

"I think we share the same goal of having a peaceful and a safe environment for people to assemble," said Lt. Gary Nelson, who organized the response to a recent demonstration in the Third Precinct. "I think in days past, it was handled more as crowd control."

The department, which frequently tweets protest updates from its official account, received equally high marks after recent demonstrations against the building of a wall along the U.S.-Mexico border and in support of women's rights.

Nelson said that the approach was another example of the department dealing with demonstrations in a more nonconfrontational, friendly way, "as opposed to years prior where I think it was more trying to maintain law and order."

He traced the philosophical shift back to 2010 when the department faced a flood of criticism for what some viewed as its heavy-handed tactics against Occupy Wall Street protesters.

At the same time, Nelson said, the balancing act required of police remains one of protecting protesters' right to free speech, while ensuring public safety.

Days before a protest against President Donald Trump's travel ban for citizens of seven Muslim-majority countries, police approached organizers to get an idea of the march's route to City Hall, before drawing up a plan to "allow for safe passage," Nelson said.

Authorities also reassured anxious business owners along East Lake Street. And, Nelson said, the department was in constant contact with other agencies like Metro Transit police, in anticipation of potential transit disruptions in the area.

But, he added, that isn't always possible when, thanks to social media, large protests can materialize in a matter of hours, unplanned and unscripted.

More recently, law enforcement agencies have come under fire for aggressive tactics in dealing with large-scale protests in Baton Rouge, La., Baltimore and North Dakota.

The response to the pipeline protest in Minneapolis was refreshingly restrained, some protesters said.

"The ones I saw were very professional," said Serena Brook in a phone interview this week. "They stayed very neutral, which I think they were doing their jobs and they were doing well."

Many in the crowd appreciated police's nearly invisible role in the march, according to Brook, a cast member of "A Prairie Home Companion."

"The police were all back at a distant and standing respectfully and I said thank you to a few of them as I marched on," said Nick Benson, a web developer from Burnsville. "It's important that there's a middle ground between people who still want to advocate for change and reform and those who are out there and have a job to do."

Others agreed.

"We have a police liaison who talks to police in advance, so we've always had a very good working relationship with the MPD in that sense," said Javier Morillo-Alicea, president of the SEIU Local 26, the union that represents janitors, security guards and window washers.

He said that there have been a few instances "where people come specifically to gin up bad reactions," provoking an aggressive police response, but for the most part both sides are on their best behavior.

The department's restraint isn't popular with everyone.

"All protesters who infringe upon others interests and freedoms to move freely about should be arrested and jailed," one person tweeted. Another posted: "why can't u arrest people that r breaking the law?"

With the recent explosion of street protests nationwide, lawmakers in at least eight states are considering crackdowns on such demonstrations. A measure unveiled by Minnesota Republicans late last month would make protesters pay for the costs associated with policing disruptive civil action. The proposal has drawn a sharp response from social justice advocacy groups.

Rep. Nick Zerwas, R-Elk River, who introduced the bill, said that, based on media reports, law enforcement agencies in Minneapolis, St. Paul and Bloomington had spent $2.4 million over 18 months for policing of protests.

Minneapolis officials said they oppose the measure, writing that the city "supports the rights of all people to engage in protected first amendment speech, assembly, and protest without the burden of risk of civil liability for public safety response costs."

The city incurred roughly $600,000 in expenses related to dealing with protests in 2016, most due to overtime pay for officers.

The department's approach in the pipeline protest last week was in stark contrast with actions following the police shooting of Jamar Clark in 2015, when it received widespread criticism after some officers use batons and pepper spray against the crowd. Months later, on the day before County Attorney Mike Freeman announced he wouldn't charge the two officers involved, police Chief Janeé Harteau issued a stern public warning that any protests that "jeopardize the safety of others" would end with swift arrests.

A U.S. Justice Department report assessing the department's response to the 18-day occupation of a police station following Clark's death is expected to be released in the next few weeks.

Police spokeswoman Sgt. Catherine Michal said that as the crowd outside the police station got more aggressive, so did police officers.

"If the protesters or the demonstrators started raising the bar of throwing rocks or doing stuff that was unlawful, the officers would raise the bar as well," Michal said.

With police behavior and tactics under scrutiny as never before, officers are always mindful of how their actions might come across, according to Nelson, the police lieutenant.

An image of a cop reaching for his or her baton captured on a bystander's cellphone and beamed out via social media can change the narrative of a protest, he said. The focus should remain on the protesters and their message, he said.

"It should not become a story about the Minneapolis police," he said.

Libor Jany • 612-673-4064 Twitter:@StribJany