President Obama called Turkish President Recep Tayyip Erdogan on Wednesday to express his condolences for the terror attack that left at least 41 people dead and more than 270 wounded.

"Let me just publicly extend my deepest condolences to the people of Turkey for the terrible attack that took place in Istanbul," Mr. Obama said during brief remarks after a bilateral meeting with Mexican President Enrique Peña Nieto in Ottawa, Canada.

Several suicide bombers blew themselves up after opening fire Tuesday at Istanbul's main airport. Turkish Prime Minister Binali Yildirim said it looked like the Islamic State in Iraq and Syria (ISIS) was connected to the attack.

Get Breaking News Delivered to Your Inbox

The president described his phone call with Erdogan and said he called him to "to discuss with him not only how heartbroken we have been by the images of the injured and those killed, but also to reaffirm our strong commitment to partner with Turkey, with NATO, with the broad-based alliance that we have structured around the world to fight [ISIS]," he said.

He reiterated that the U.S. is committed to defeating ISIS in Iraq and Syria.

"We stand with the people of Turkey and we intend to do what's necessary to ensure these kinds of terrible events are not happening."

Speaking at the Council on Foreign Relations, CIA Director John Brennan said the attacks "have the hallmarks of ISIL's depravity," though he is not aware of a "credible claim of responsibility at this point." But he added that "in most instances--if not all--ISIS has not claimed responsibility for attacks that are perpetrated inside of Turkey."

En route to Ottawa, White House spokesman Josh Earnest told reporters aboard Air Force One that Mr. Obama offers any support that Turkey can benefit from as it conducts the investigation into the attack and takes steps to strengthen its own security.

Mr. Obama is in Ottawa for the "Three Amigos" summit to meet with his Mexican and Canadian counterparts.

Homeland Security Secretary Jeh Johnson was among the officials who flew on Air Force One with the president.