U.S. President Barack Obama telephoned Afghan President Hamid Karzai about the violence in Egypt and Libya and the safety of U.S. troops and Afghans. A White House statement said Obama called the Afghan leader Wednesday for regular consultations and used the opportunity to discuss the attacks on U.S. Consulate in Benghazi, Libya, in which U.S. Ambassador to Libya Chris Stevens and three other diplomats were killed. "President Karzai expressed condolences for the tragic loss of American life and the presidents discussed the importance of working together to help ensure that the circumstances that led to the violence in Libya and Egypt do not pose a threat to U.S. forces or Afghans," the state said. "President Obama also reaffirmed his commitment to transferring detainees to Afghan authority in a manner that respects Afghan sovereignty and protects U.S. and Afghan forces." Violence by the Taliban and other militant groups has escalated in Afghanistan as U.S. and NATO troops prepare to end their combat operations by 2014. Of special concern to U.S. military officials are the growing insider attacks on U.S. troops by militants posing as Afghan security personnel.