By Mirwais Harooni and Missy Ryan
KABUL, March xx (Reuters) - The soldiers were asleep when attackers struck their outpost, tucked in the mountains of Afghanistan's eastern province of Kunar and on the front lines of a deepening war between the army and a potent mix of militants.
Afghan officials say scores of militants killed 21 soldiers as they overran the tiny fortified base on Feb. 23.
While the circumstances remain murky, the assault underscores the challenges Afghanistan will face as foreign forces withdraw to prevent hard-to-govern areas such as Kunar reverting to the militant safe havens they once were.
The diverse group of militants, including a small but stubborn contingent of al Qaeda fighters, will be all the more troubling if Western nations withdraw fully this year.
"We have the same concerns as everyone about 2014," said Wagma Sapay, a parliamentarian from Kunar, referring to the possible departure of all foreign forces, which would leave the Afghan police and army to face insurgents alone for the first time.
"Our security forces are not able to provide security for people alone."
U.S. officials reckon that about 50 al Qaeda militants remain in Afghanistan, operating from remote areas in Kunar and neighbouring Nuristan.
The two provinces are also believed to be home to militants from the Afghan Taliban, the Pakistani Taliban, the Hizb-i-Islami militant group, and dozens of other outfits.
Kunar police chief Abdul Habib Sayedkhalil estimates that in his province alone there are 3,000 to 4,000 militants from 166 groups.
"There's a toxic stew of bad guys up there," said Major General Stephen Townsend, who commands U.S. and NATO forces in eastern Afghanistan.
With Afghan President Hamid Karzai refusing to sign a bilateral security pact, the White House said last week that it would begin planning for a full withdrawal of its 33,000 troops at the end of 2014, despite a long-standing plan to keep a modest troop presence.
The prospect of a complete drawdown has thrown into doubt U.S. plans for a post-2014 mission that would focus in large part on going after die-hard al Qaeda fighters, most likely through small special forces raids and air strikes.
The commander of NATO-led forces in Afghanistan, General Joseph Dunford, on Wednesday gave a bleak assessment of prospects in the event of a full withdrawal.
"Without the Resolute Support mission, the progress made to date will not be sustainable," Dunford told the U.S. Senate Armed Services Committee, referring to a post-2014 NATO training and advisory mission.
A limited number of advisers was needed to train and assist Afghan forces, he said, adding that without help, Afghan forces would deteriorate and al Qaeda and others would see an opportunity to again establish Afghan bases.
Wooded, sparsely populated Kunar and Nuristan, bordering Pakistan's dangerous ethnic Pashtun areas, have long been ungovernable spaces. During the Soviet occupation in the 1980s, Soviet and the Afghan Communist troops struggled and failed to quell mujahideen fighters there.
The provinces have seen some of the U.S. military's fiercest fights since 2001 as it sought to stem the flow of weapons and militants from Pakistan, including a 2005 encounter in which 19 American troops were killed.
Today, many local officials blame widespread insecurity on the departure of foreign forces from almost all of their bases.
In Kunar, police chief Sayedkhalil said that while Afghan police and soldiers are able to secure towns and main roads, insurgents control mountains and remote or forested areas.
"Insurgents can't take on Afghan security forces directly, so they target them by planting roadside bombs and launching terrorist attacks," he said.
"Nuristan is covered with forests and lacks paved roads - providing security is not an easy task," said Hazrat Shah Nuristani, another lawmaker. He said provincial officials had repeatedly asked Afghan forces for help, to little avail.
Afghanistan's police and army say they have made some headway in the region, but the terrain and a lack of sophisticated equipment work against them.
Haroon Yosufzai, an army spokesman for eastern Afghanistan, said Afghan soldiers were engaged in six operations against the Taliban and al Qaeda in Kunar, and more would begin soon.
"For Nuristan, right now we don't have a plan," he said.
But Afghan forces still rely on foreign forces for air power, intelligence and logistics, important in areas to which troops and supplies need to be air-lifted.
'BRAINS' OF THE AFGHAN INSURGENCY
It is unclear how much Afghanistan can do to eliminate safe-havens unless Pakistan prevents militants from regrouping, resupplying and directing attacks from within its borders.
"In Afghanistan, we defeated al Qaeda and Osama bin Laden and his fighters, but we could not expand that fight beyond the Durand Line," said Interior Ministry spokesman Sediq Sediqqi, referring to the border with Pakistan.
Pakistan, mired in a bloody insurgency of its own, denies it harbours militants in its tribal lands along the border.
Al Qaeda is considered a serious threat still because of its ability to inspire and train others. Afghan officials describe the group as the "brains" of the insurgency, while Townsend called it the "special forces" of Afghan militants - more skilled and better funded.
If U.S. forces do leave this year, Washington's ability to target al Qaeda fighters would be greatly diminished. However, it may not be eliminated: the United States could still target al Qaeda leaders with drone strikes or special-forces missions launched from outside Afghanistan. (Editing by Maria Golovnina, John Chalmers and Robert Birsel)