The death of a U.S. general, Harold Greene, in Kabul on Tuesday has underscored the continuing danger for allied troops and our Afghan partners in that country. Greene was the highest-ranking American officer to be killed in combat since the Vietnam War.

Questions remain about what happened at the Marshal Fahim National Defense University, an officers academy, on Tuesday. But the Defense Department has confirmed that the shooter was an Afghan soldier who opened fire during a visit of senior American and Afghan officers. Fifteen other soldiers were wounded in the attack, including a German brigadier general and the Afghan officer who ran the university. The assailant was killed at the scene.

The news comes at a delicate time for the U.S. mission in Afghanistan. The U.S. military is in the process of winding down its operations in the country, and the plan is to withdraw most forces by the end of the year. The security situation in the country has shown definite signs of improvement. Despite Tuesday's tragic incident, "green-on-blue" attacks (the military's term for Afghan forces firing on allied troops) have declined: from 44 such attacks in 2012, to 14 in 2013, to just three so far this year. There's been an increase in the professionalism of the Afghan security forces, and allied troops have gotten far better at vetting recruits.

But Afghanistan still faces major stability challenges. It isn't clear when a successor to President Hamid Karzai will take office - the two rival candidates are still battling bitterly over the contested results of a runoff election. The political crisis is threatening to split the Afghan government, which already suffered from weakness. A weak central government in Kabul won't be able to fight off the Taliban.

That's the unfortunate backdrop to Maj. Gen. Greene's death and the 13-year-old American mission. More than 2,300 U.S. service members have died in Afghanistan, but the outcome of the war remains as nebulous as ever.

The Defense Department has said that Tuesday's tragedy won't affect plans to continue withdrawing troops, and that the training mission of which Greene was a part will continue. Both of those decisions are (sadly) the right ones.