Nearly two years after President Barack Obama ordered 33,000 more U.S. troops to Afghanistan to tamp down the escalating Taliban violence, the last of those surge troops have left the country, U.S. officials said Thursday.

That still leaves about 68,000 American troops still in the nation, as was the case in late 2008. And violence continues to rage in parts of Afghanistan, including numerous high-profile “green-on-blue” attacks of late in which men dressed in Afghan police and military uniforms open fire on other Afghan security officers and coalition forces.

The withdrawal, which began in July, follows an unprecedented number of NATO soldiers being shot dead by their Afghan colleagues — 51 so far this year — and comes as anti-Western protests sweep Muslim countries.

A phased withdrawal plan was developed where 10,000 troops would leave Afghanistan by July 2011 and the remaining 23,000 would leave Afghanistan by the end of September 2012.

Panetta, traveling in New Zealand on Thursday, released a statement announcing an end to the surge.

“As we reflect on this moment, it is an opportunity to recognize that the surge accomplished its objectives of reversing Taliban momentum on the battlefield, and dramatically increased the size and capability of the Afghan National Security Forces (ANSF),” Panetta’s statement said. ”This growth has allowed us and our ISAF Coalition partners to begin the process of transition to Afghan security lead, which will soon extend across every province and more than 75 percent of the Afghan population. At the same time, we have struck enormous blows against al Qaeda’s leadership, consistent with our core goal of disrupting, dismantling and defeating al Qaeda and denying it a safe-haven.”

Military commanders say the war strategy is on track and that they have made broad gains against the Taliban, wresting control of areas where the insurgents once had strong footholds. And U.S. Defense Secretary Leon Panetta has characterized the insider attacks as the last gasp of a desperate insurgency.