Phoenix (CNN) A town hall for liberal activists featuring two Democratic presidential candidates was interrupted by dozens of demonstrators on Saturday who shouted down the contenders and demanded they address criminal justice issues and police brutality.

Former Maryland Gov. Martin O'Malley and Vermont Sen. Bernie Sanders planned to attend a public sit-down interview with journalist Jose Antonio Vargas in front of a left-leaning crowd here at the annual Netroots Nation conference, a gathering of progressives, when the tone of the program shifted just a few minutes into the event.

O'Malley was answering questions from Vargas on stage when dozens of boisterous conference attendees flooded through a side door and shouted down the White House contender.

"What side are you on my people?" they sang in unison as they approached.

Tia Oso of the Black Alliance for Just Immigration, who represented the demonstrators, climbed onto the stage, secured a microphone, and delivered a speech while O'Malley looked on.

"We are going to hold this space. We are going to acknowledge the names of black women who have died in police custody. And Governor O'Malley, we do have questions for you ... As the leader of this nation, will you advance a racial justice agenda that will dismantle -- not reform, not make progress -- but will begin to dismantle structural racism in the United States?"

"Yes," O'Malley replied, but before he could say more, the demonstrators in front of the stage shouted over him by reciting names of black women who have died in police custody. While they shouted, O'Malley stood in silence. At one point he turned to Oso on stage: "My people came here as immigrants from Ireland."

Below, dozens shouted several chants in unison.

Conference organizers begged them to allow O'Malley to respond.

JUST WATCHED Meet the progressives who want Hillary to 'feel the Bern' Replay More Videos ... MUST WATCH Meet the progressives who want Hillary to 'feel the Bern' 03:02

"I think all of us as Americans have a responsibility to recognize the pain and the grief throughout our country from all of the lives that have been lost to violence, whether that's violence at the hands at the police or whether that's violence at the hands of civilians," O'Malley said, before being interrupted again.

"Don't generalize this s***!" one person shouted back.

O'Malley said he wanted to require police departments to report all police-involved shootings and brutality complaints and he called on departments to implement civilian review boards. He vowed to release a wide-ranging plan on criminal justice reform.

The demonstrators started shouting and booing again when O'Malley said: "Black lives matter. White lives matter. All lives matter."

"That was a mistake on my part and I meant no disrespect," O'Malley told the outlet. "I did not understand the tremendous passion, commitment and feeling and depth of feeling that all of us should be attaching to this issue."

And when he stepped off stage, he chanted, "Black lives matter! Black lives matter!"

When Sanders approached the stage a moment later, the demonstrators continued. The candidate, a favorite of Netroots Nation, threatened to leave if they continued to interrupt him.

"Black lives, of course, matter. I spent 50 years of my life fighting for civil rights and for dignity," he said. "But if you don't want me to be here, that's OK. I don't want to outscream people."

Sanders proceeded to deliver his usual presidential stump speech over sporadic shouting from below.

After talking over one another, Sanders eventually ditched pre-planned remarks and tried to address questions from demonstrators.

"Black people are dying in this country because we have a criminal justice system which is out of control, a system in which over 50% of young African-American kids are unemployed," Sanders said. "It is estimated that a black baby born today has a one in four chance of ending up in the criminal justice system."

Photos: 'Black lives matter' protests Photos: 'Black lives matter' protests Demonstrators chant during a rally in downtown Manhattan on December 13. Hide Caption 1 of 16 Photos: 'Black lives matter' protests Police arrest a "Black Lives Matter" protester on Saturday, December 20, in Bloomington, Minnesota. Invoking the familiar names of blacks who died at the hands of police, including Eric Garner, Michael Brown and Tamir Rice, thousands have taken part in protests across the country calling for a more aggressive federal response to recent slayings by police. Hide Caption 2 of 16 Photos: 'Black lives matter' protests Thousands of protesters fill the Mall of America in Bloomington on Saturday, December 20. Hide Caption 3 of 16 Photos: 'Black lives matter' protests Police line up to move the protesters from out of the mall on December 20 in Bloomington. Hide Caption 4 of 16 Photos: 'Black lives matter' protests Mikela Mosley speaks out in front of a line of police during a demonstration on Saturday, December 13, in Oakland, California. Hide Caption 5 of 16 Photos: 'Black lives matter' protests A protester is arrested at a demonstration on December 13 in Oakland. Hide Caption 6 of 16 Photos: 'Black lives matter' protests Demonstrators march over the inbound lane of the Brooklyn Bridge in New York on December 13. Hide Caption 7 of 16 Photos: 'Black lives matter' protests Protesters stage a "die-in" during a march in Chicago on December 13. Hide Caption 8 of 16 Photos: 'Black lives matter' protests Demonstrators face off with police during a march in Chicago on December 13. Hide Caption 9 of 16 Photos: 'Black lives matter' protests Protesters march through the streets of Oakland on December 13. Hide Caption 10 of 16 Photos: 'Black lives matter' protests Protesters gather at the Alameda County Courthouse in Oakland on December 13. Hide Caption 11 of 16 Photos: 'Black lives matter' protests A demonstrator marches in New York on December 13 during the "Justice for All" rally. Hide Caption 12 of 16 Photos: 'Black lives matter' protests The protest moves down Sixth Avenue in New York on December 13. Hide Caption 13 of 16 Photos: 'Black lives matter' protests A woman marches down 14th Street in New York on December 13. Hide Caption 14 of 16 Photos: 'Black lives matter' protests From left, Samaira Rice, the mother of Tamir Rice; Lesley McSpadden, the mother of Michael Brown Jr.; the Rev. Al Sharpton and Michael Brown Sr., the father of Michael Brown Jr, raise their hands in the air during the "Justice For All" march and rally through Washington on December 13. Hide Caption 15 of 16 Photos: 'Black lives matter' protests Protesters fill the street as they gather for a march on December 13 in Washington. Hide Caption 16 of 16

When Sanders cited the Affordable Care Act as a law he supported that helped people of color by making health insurance more accessible, one man shouted, "we can't afford that!"

Before Sanders finished speaking, many of the protesters walked out on him toward exit doors in the back.

The spectacle was a far cry from what was expected of the forum. Sanders, who is running as a more liberal alternative to Democratic presidential candidate Hillary Clinton, was one of the most highly anticipated speakers at the gathering. Hours before the event, excited supporters lined up to hear him speak, and some ran to secure seats close to the stage when organizers opened the doors.

Attendees who were not part of the rally said they supported the protesters' message, but debated how it was carried out.

Conference organizers issued a statement following the townhall.

"Our aim was to give presidential candidates a chance to respond to the issues facing the many diverse communities represented here," Netroots Nation spokeswoman Mary Rickles said. "Although we wish the candidates had more time to respond to the issues, what happened today is reflective of an urgent moment that America is facing today."