Bernie Sanders appeared on ABC's "Jimmy Kimmel Live!" Tuesday night to discuss the terrorist attacks in Brussels and Donald Trump's reaction to them.

In response to the attacks, which killed at least 31 people and wounded hundreds, Trump renewed his stance endorsing the use of torture "beyond waterboarding" to gain intelligence, as well as his controversial proposal to ban Muslim immigrants from entering the US.

In response, Sanders told host Jimmy Kimmel, "At the end of the day, we cannot allow the Trumps of the world to use these incidents to attack all of the Muslim people in the world. That is unfair. That is not what this country is about."

The candidate for the Democratic presidential nomination also referenced Trump's earlier statements on Mexican immigrants as an example of his hurtful blanket statements.

"When he talks about Mexicans coming over the border as rapists or criminals," Sanders, 74, said, "that is not what this country is about. We don't need, in my view, a president hurling these types of insults."

Kimmel told the candidate that he could see Trump bombing a house that might contain innocent people as part of the war on terror and wondered if Sanders would do so, as well.

"Obviously, if I were elected president of the United States, I would use the military forces of our country in an effective and appropriate way," Sanders answered.

Election confrontation aside, Kimmel wondered if Sanders is friends with Trump. To which the candidate said he doesn't speak to Trump "and I didn't go to his wedding either," a joking reference to opponent Hillary Clinton's attendance at Trump's 2005 wedding to wife Melania Trump.

Sanders did say that he and Clinton speak on occasion and that he doesn't believe that he contributes to her low popularity rating.

"We have been very careful about not attacking Secretary Clinton in any kind of a personal way," Sanders explained. "Other people do that. We have not. We focus on the issues."

Watch the exchange and more of Sanders' interview below: