Obama made the remarks during a press conference in Ottawa, Canada at the so-called Three Amigos Summit -- a trilateral meeting among the heads of state of Canada, Mexico and the United States.

With Mexican President Enrique Pena Nieto seated nearby and nodding his head in agreement, Obama called the attack on Tuesday “terrible” and said he expressed support for Turkish President Recep Tayyip Erdogan during a telephone call earlier in the day.

“The president placed that phone call to express his deep condolences on behalf of the American people,” White House press secretary Josh Earnest told reporters while headed to Ottawa aboard Air Force One, according to CNN. “In the context of that call, he will offer any support that the Turks can benefit from as they conduct this investigation and take steps to further strengthen their security.”

Turkish Prime Minister Binali Yildirim said Wednesday that indications are that the Daesh terrorist organization was behind the attack. The group has not yet claimed responsibility.

While not naming Daesh specifically, Obama had harsh words for those responsible.

“It’s an indication of how little these vicious organizations have to offer beyond killing innocents,” Obama said at the press conference. “They’re continually losing ground, unable to govern those areas that they have taken over. They are going to be defeated in Syria, they are going to be defeated in Iraq.”

Obama, who was speaking at the end of a meeting with the Mexican president, vowed to pursue and destroy all terror groups.

“We will not rest until we have dismantled these networks of hate that have had an impact on the entire civilized world,” he said.

Anadolu Agency