President Barack Obama has apologized to Doctors Without Borders for the U.S. air attack that hit the group's medical clinic in Afghanistan.

Obama spoke to the group's international president, Joanne Liu, on Wednesday.

White House spokesman Josh Earnest says Obama offered his condolences to the aid group's staff. He says Obama assured her that there would be a thorough and objective accounting of the facts.

Earnest says Obama told the group that the U.S, if necessary, would make changes so such incidents are less likely to happen.

The White House says Obama also spoke with Afghan President Ashraf Ghani and pledged to keep working closely with his government.

The weekend attack in the northern city of Kunduz killed at least 22 people.

More From Newstalk KGVO 1290 AM & 98.3 FM