The Democratic presidential contender spoke to reporters after touring the Baltimore neighborhood where Freddie Gray was arrested and meeting with local pastors to discuss economic and social issues confronting the black community. But before Sanders arrived at a previously scheduled press conference, his national press secretary Symone Sanders told the assembled reporters to stay "on-topic" and not to ask about ISIS.

See Sanders on the campaign trail:

10PHOTOS

Bernie Sanders on the campaign trail

See Gallery

Sanders gets testy with press over ISIS question

PHOENIX, AZ - MARCH 15: Democratic presidential candidate Sen. Bernie Sanders (D-VT) speaks to a crowd gathered at the Phoenix Convention Center during a campaign rally on March 15, 2016 in Phoenix, Arizona. Hillary Clinton won the Democratic primary elections in Florida, North Carolina and Ohio, while Missouri and Illinois remain tight races. (Photo by Ralph Freso/Getty Images)

DES MOINES, IA - JANUARY 26: Democratic presidential candidate Sen. Bernie Sanders (I-VT) speaks to the media after holding a campaign event with United Steelworkers Local 310L, on January 26, 2016 in Des Moines, Iowa. Sanders continues his quest to become the Democratic presidential nominee.. (Photo by Joe Raedle/Getty Images)

Senator Bernie Sanders, an independent from Vermont and 2016 Democratic presidential candidate, participates in the Democratic presidential candidate debate in Charleston, South Carolina, U.S., on Sunday, Jan. 17, 2016. Hours before Sunday's Democratic debate, the two top Democratic contenders held a warm-up bout of sorts in multiple separate appearances on political talk shows, at a time when the polling gap between the pair has narrowed in early-voting states. Photographer: Patrick T. Fallon/Bloomberg via Getty Images

NEW YORK, NY - JANUARY 05: Democratic presidential candidate Sen. Bernie Sanders (I-VT) shakes hands with supporters after outlining his plan to reform the U.S. financial sector on January 5, 2016 in New York City. Sanders is demanding greater financial oversight and greater government action for banks and individuals that break financial laws. (Photo by Andrew Burton/Getty Images)

LEBANON, NH - NOVEMBER 11: Presidential candidate Bernie Sanders (I-VT) marches in the Veterans Day Parade November 11, 2015 in Lebanon, New Hampshire. Sanders goes into the Democrats second debate this weekend still running strong in the polls.(Photo by Darren McCollester/Getty Images)

Senator Bernie Sanders, an independent from Vermont and 2016 Democratic presidential candidate, speaks at the Congressional Hispanic Caucus Institute conference in Washington, D.C., U.S., on Wednesday, Oct. 7, 2015. While next Tuesday's first Democratic presidential debate will probably lack the name-calling and sharp jabs of the Republican face-offs, there's still potential for strong disagreements between the party's leading contenders. Photographer: Andrew Harrer/Bloomberg via Getty Images

US Senator from Vermont and Democratic presidential candidate Bernie Sanders addresses striking low-wage contract workers from the US Capitol and religious leaders at the Lutheran Church of the Reformation in Washington, DC, on September 22, 2015 for an interfaith service ahead of the arrival of Pope Francis for a six-day visit to the US. AFP PHOTO/NICHOLAS KAMM (Photo credit should read NICHOLAS KAMM/AFP/Getty Images)

MANCHESTER, NH - SEPTEMBER 19: Democratic Presidential candidate Senator Bernie Sanders (I-VT) talks on stage during the New Hampshire Democratic Party State Convention on September 19, 2015 in Manchester, New Hampshire. Five Democratic presidential candidates are all expected to address the crowd inside the Verizon Wireless Arena. (Photo by Scott Eisen/Getty Images)

Up Next

See Gallery

Discover More Like This

HIDE CAPTION

SHOW CAPTION

of

SEE ALL

BACK TO SLIDE

Sanders took only questions from local media during the presser, all of which focused on the economic issues confronting the African American community. But before he exited the presser, one reporter asked him outright: "Do you not want to talk about ISIS?"

Sanders grew visibly frustrated, laughing bitterly before replying: "Alright, what about ISIS, guys? How often do these people talk about issues that we talked about today? Of course I'll talk about ISIS."

"But today what we're talking about is we're talking about a community where half of the people don't have jobs. We're talking about a community in which there are hundreds of buildings that are uninhabitable. We're taking about a community where kids are unable to go to schools that are decent," he added.

He went on to say that "obviously ISIS and terrorism are a huge national issue that we've got to address. But so are poverty, so is unemployment, so is education, so is health care, so is the need to protect working families."

Sanders then stormed out of the room and abruptly left the venue, a community center named in Freddie Gray's honor, in a black van.

Sanders' comments come as he continues to trail Democratic presidential frontrunner Hillary Clinton in the polls, and as he's facing mounting questions over whether he's able to expand his focus beyond economic issues and show an ability to tackle foreign policy.