Pentagon spokesman Rear Adm. John F. Kirby said that the killing of U.S. Army Maj. Gen. Harold Greene in an insider attack at a training base in Kabul yesterday would not change the administration’s plans to leave a residual force in the country after U.S combat forces withdraw by the end of this year, reported the New York Times.

Greene is the highest-ranking U.S. military officer to be killed in a combat zone since Vietnam. The incident, perpetrated by an Afghan security official, not an insurgent, is likely to spur calls for the U.S. to withdraw completely from Afghanistan.

The White House will have to weigh the calls for a complete withdrawal with competing pressure to keep U.S. forces in the country to prevent a situation similar to what we are now seeing in Iraq, where Islamist insurgents have taken over large swathes of the country.

Following President Obama’s recent announcement to leave a residual force presence of 9,800 troops in Afghanistan that would be fully withdrawn by the end of 2015, some members of Congress expressed concern that the U.S. is drawing down too quickly, which would allow the Taliban to make territorial gains in Afghanistan the same way the Islamic State has done in Iraq. The U.S. withdrew all forces from Iraq at the end of 2011, when the administration failed to reach a status of forces agreement with the Iraqi regime.

Insider attacks in Afghanistan are not new, but have become more rare in recent years. They peaked in 2012 when Afghan security personnel turned their guns on at least 61 U.S. and NATO forces. Most of these attacks were committed by disgruntled security personnel, not Taliban infiltrators, according to the Defense Department.

U.S. and Afghan officials have worked to tighten vetting procedures and to put in place other measures to mitigate the threat from insider attacks. These steps seemed to help as the rate of occurrence of insider attacks has receded in the last two years.

The high profile attack comes in the midst of a political crisis in the country in which claims of fraud in the June run-off election for president have led to an internationally supervised ballot re-count. Failure to resolve the electoral dispute could lead to ethnic divisions in the country, and the prospect for ethnic-based violence that the Taliban would surely exploit to their advantage.

A prolonged election dispute and failure to establish a legitimate successor government also would jeopardize the U.S. ability to leave troops in Afghanistan post-2014, which requires the new Afghan government to sign a bilateral security agreement defining the terms of the U.S. deployment.

It is up to the Afghan leadership and the presidential contenders to demonstrate they are willing to take responsibility for securing their country’s democratic future. The U.S. can support the Afghans in fighting the insurgents but it is up to the Afghans themselves to show their commitment to the democratic process.