/ Updated 
By Khorri Atkinson

President Barack Obama criticized the Black Lives Matter movement, saying that activists should be willing to sit down and discuss their agenda with leaders in power rather than “yelling at them.”

At a youth town hall in London on Saturday, the president lauded the movement for effectively bringing attention to racially motivated police violence across the country — but he said the harsh tone activists are using is troubling.

President Barack Obama speaks at the 'Town Hall' discussion with British youth at the Royal Horticultural Halls on April 23, 2016 in London.Christopher Furlong / Getty Images

“You can’t just keep on yelling at them and you can’t refuse to meet because that might compromise the purity of your position,” Obama said. “The value of social movements and activism is to get you at the table, get you in the room and then start trying to figure out how is this problem going to be solved. You then have a responsibility to prepare an agenda that is achievable —that can institutionalize the changes you seek and to engage the other side.”

Obama’s remarks come after activists from the movement protested at presidential candidates’ campaign events, including Hillary Clinton, the Democratic front-runner.

Related: DeRay Mckesson on Future of Black Lives Matter

In Philadelphia earlier this month, when former President Bill Clinton was campaigning for his wife, he engaged in a heated back and forth exchange with activists who slammed him for the 1994 crime bill he enacted.

The Clintons have faced intense scrutiny from Black Lives Matter activists and other protesters over the law, which they say unfairly put a high number of black and Latino Americans in prisons and allocated billions of dollars for prison grants and police expansion.

And at a South Carolina private fundraiser in February, an activist from the group interrupted the event, calling out Clinton for the “super predators” term she had used to advocate for the 1994 measure as first lady. Some say the racially-charged term targets young people of color. Clinton had recently said she regrets using the term.

At the London youth forum, Obama called on activists to compromise with those they disagree with.

“Too often what I see is wonderful activism that highlights a problem, but then people feel so passionately and are invested in the purity of their position that they never take that next step and say, ‘Well now I have to sit down and try to actually get something done ?’” he said.