White House press secretary Josh Earnest said President Obama apologized to Doctors Without Borders on Wednesday during a phone call with the organization’s president Joanne Liu, expressing his condolences for the U.S. bombing of the hospital in Afghanistan.

Obama promised a transparent and thorough investigation of the facts “and if necessary will implement changes to make sure tragedies like this one are less likely in the future.”

Obama also spoke by phone with Afghan President Ashraf Ghani to express condolences for the “loss of life” and “commend the bravery of the Afghan national forces.”

“When we make a mistake, we are honest, own up to it and apologize,” Earnest said at his daily briefing. “The Department of Defense goes to great lengths to prevent civilian casualties, but in this case there was a mistake and it’s one that the United States owns up to.”