KABUL, Afghanistan — When the Afghan female robotics team, made up of teenage students from the western city of Herat, finally made it to a global competition in the United States, the cameras were focused on them. Here was a glimmer of hope from a place so often associated with bloodshed. The girls had made it against all odds, including being denied visas twice.

With a big smile, Fatemah Qaderyan, 14, the team captain, illustrated just how far girls, even from a challenging place like Afghanistan, could go if given the opportunity. Crucial to that, she repeated, was the support of her parents.

On Tuesday night, Fatemah’s father, Mohammed Asef Qaderyan, 54, was killed when suicide bombers targeted worshipers at a mosque near their home in Herat.