Afghanistan’s military assumed the leadership role on security matters for every part of the country Tuesday, leaving the U.S.-led coalition even more firmly on the sidelines but raising the stakes for Afghan politicians, generals and soldiers, who still face grave threats from Taliban fighters.

During a ceremony at an elite Afghan military training camp near Kabul, Afghan President Hamid Karzai and NATO Secretary General Anders Fogh Rasmussen appeared together to announce that the U.S.-led international coalition was now in a supporting role countrywide. The event was largely symbolic, but it was celebrated across Afghanistan as a milestone and a moment of national pride.

“Our country is in the process of a historic event, and from now on, always, all the security responsibility will be conducted and performed by our forces and will be led by our own forces,” Karzai said, standing before hundreds of military leaders and diplomats.

The handoff of security responsibilities, completing a 15-month transition that started in Kabul and relatively safe western areas of the country, comes ahead of the slated withdrawal of most foreign troops by the end of next year.

But the Taliban continues to effectively control swaths of land in southern and eastern areas, and the precarious state of security is made apparent almost daily, including in another fatal attack in the capital on Tuesday.

NATO takes lesser role in Afghanistan security

The event marking the transfer of security responsibility in the remaining districts, most of which are near the country’s volatile border with Pakistan, had been kept a closely guarded secret because of security concerns. Officials said it took days to secure the venue, at one of Afghanistan’s premier military academies. Reporters were flown in by military helicopter.

Although fears of an attack on the ceremony were not realized, a bomb exploded near the Afghan parliament an hour before Karzai and Rasmussen spoke. The bomb, apparently detonated by remote control, targeted a high-profile Shiite lawmaker, Mohammad Mohaqiq.

Mohaqiq survived, but three people were killed and 30 were wounded, authorities said.

Seemingly acknowledging the persistent threat posed by the insurgency, the Obama administration said Tuesday that it will open formal negotiations with the Taliban. Karzai also appears open to talks but has said that he first wants to see greater cooperation from Pakistan in stemming cross-border attacks by Taliban fighters who seek refuge in the porous, lawless frontier region.

Karzai and Ashraf Ghani Ahmadzai, chairman of the Islamic Republic of Afghanistan Transition Coordination Commission, repeatedly stressed that they want additional high-powered weapons, including tanks and airplanes, to combat what they view as threats from regional rivals.

But after an infusion of $54 billion in U.S. aid and billions more from coalition partners to build up Afghanistan’s military and police forces, NATO and Pentagon officials say they remain optimistic about Afghan forces’ ability to head up security in even the toughest regions of the country.

“Your forces are showing great courage, great skill, and making great sacrifices,” Rasmussen said.

Although about 97,000 NATO troops remain in the country, including 68,000 U.S. troops, Rasmussen said coalition forces will fall back into support, logistical and training roles. Gradual troop reductions are slated to continue this year and accelerate after Afghanistan’s national elections in the spring.

The pending pullout has left many Afghans uneasy about the future, but several local leaders said the country’s military can now more effectively leverage national goodwill.

“Our society is a traditional one, and people tend to support our forces when they are alone,” said Ahmad Zia Abdulzai, a spokesman for the governor of eastern Nangahar province, which is near the border with Pakistan.

But Anthony H. Cordesman, a national security analyst at the Center for Strategic and International Studies in Washington, remains pessimistic.

“Yes, the Afghan forces are in the lead, but the lead to do what?” said Cordesman, adding that he fears that although the country’s military will be able to “hold urban areas and key lines of communications,” they won’t be able to oust the Taliban from areas it controls.

Lt. Gen. Mark A. Milley, who runs the day-to-day military operations of the international coalition, acknowledged that the path will not be easy for the Afghans. Long before the handover of duties this week, Afghans have been bearing the brunt of enemy attacks, losing about 33 troops for every coalition soldier killed, he said.

“It ain’t over by a long shot,” Milley said. “The enemy is fighting, and fighting hard.”

Ernesto Londoño and Sayed Salahuddin contributed to this report.