14-year-old Fatemah Qaderyan arrived home in Herat two weeks ago to a heroes’ welcome.

As the captain of an all-girl robotics team, she and her classmates had defied the odds not just to make it to an international competition in the US, but to triumphantly come home with a silver medal.

During an interview at the First Global Challenge international robotics contest in Washington DC in July, Fatemah told reporters that her father had been her greatest support as the team travelled 800 kilometres (500 miles) to Kabul twice, only to have their visas rejected under Donald Trump’s new travel restrictions.

They were finally granted permission to enter the US just a week before the competition, where judges praised their “can-do” attitude and “courageous achievement”.

Just 10 days later, 54-year-old Mohammed Qaderyan was killed in the latest Isis atrocity in Afghanistan when a suicide attacker opened fire and then detonated explosives during evening prayers at a Shia mosque.

Roya Mahboob, a prominent tech-focussed entrepreneur from Herat who helped get the girls to the US, confirmed the news of Mr Qaderyan’s death on Twitter, offering her condolences to the family.

A spokesperson for the governor of Herat’s office also confirmed he was among the dead.

US drops 'Mother Of All Bombs' on Islamic State cave system in Afghanistan

“[Fatemah] is very angry and is not eating or speaking to anyone, she is going through a very difficult time,” team director Ali Reza Mehrban told al Jazeera, adding that the girl is “angry and grieving”.

At least 37 people died and more than 60 were injured in the attack in the normally peaceful eastern city on Tuesday night after an Isis gunman killed the guards at a Shia mosque in Herat before entering inside and detonating a suicide vest in the midst of hundreds of worshippers.

The attack was claimed the next day by the Sunni militant group - which had recently threatened an increase in attacks on Shia Muslims.

This week has been yet another bloody one in Afghanistan; as well as the Herat attack, on Wednesday, a Taliban attack in Kandahar killed two US soldiers, and violence killed civilians in both Helmand and Paktia provinces.

Two Isis fighters attempted to storm the Iraqi embassy in Kabul on Monday, killing two guards in a suicide bombing.

Afghanistan: Between Hope and Fear Show all 16 1 /16 Afghanistan: Between Hope and Fear Afghanistan: Between Hope and Fear 2001 Afghans at the Killi Faizo refugee camp desperately reach for bags of rice being handed out to the thousands who escaped the bombardment in southern Afghanistan during Operation Enduring Freedom. (Chaman, Pakistan, December 4, 2001) Paula Bronstein Afghanistan: Between Hope and Fear 2002 Mahbooba stands against a bullet-ridden wall, waiting to be seen at a medical clinic. The seven-year-old girl suffers from leishmaniasis, a parasitical infection. (Kabul, March 1, 2002) All photos Paula Bronstein Afghanistan: Between Hope and Fear 2003 A mother and her two children look out from their cave dwelling. Many families who, fleeing the Taliban, took refuge inside caves adjacent to Bamiyan’s destroyed ancient Buddha statues now have nowhere else to live. (Bamiyan, November 19, 2003) Paula Bronstein Afghanistan: Between Hope and Fear 2007 Students recite prayers in a makeshift outdoor classroom in the Wakhan Corridor, a mountainous region in northeastern Afghanistan that extends to China and separates Tajikistan from India and Pakistan. (Northeastern Afghanistan, September 2, 2007) Paula Bronstein Afghanistan: Between Hope and Fear 2007 Bodybuilders in the 55-60 kg category square off during a regional bodybuilding competition. Many Afghan men, like others around the world, feel that a macho image of physical strength is important. (Kabul, August 6, 2007) Paula Bronstein Afghanistan: Between Hope and Fear 2008 A woman in a white burqa enjoys an afternoon with her family feeding the white pigeons at the Blue Mosque. (Mazar-e-Sharif, March 8, 2008) Paula Bronstein Afghanistan: Between Hope and Fear 2009 Addicts inject heroin while trying to keep warm inside the abandoned Russian Cultural Center, which the capital city’s addicts use as a common gathering point. Heroin is readily available, costing about one dollar a hit. (Kabul, February 9, 2009) Paula Bronstein Afghanistan: Between Hope and Fear 2009 An elderly man holds his granddaughter in their tent at a refugee camp after they were forced to flee their village, which US and NATO forces had bombed because, they claimed, it was a Taliban hideout. (Surobi, Nangarhar Province, February 7, 2009) Paula Bronstein Afghanistan: Between Hope and Fear 2009 Seven-year-old Attiullah, a patient at Mirwais Hospital, stands alongside an X ray showing the bullet that entered his back, nearly killing him. Attiullah was shot by US forces when he was caught in a crossfire as he was herding sheep. (Kandahar, October 13, 2009). Paula Bronstein Afghanistan: Between Hope and Fear 2010 US Army Sargeant Jay Kenney (right), with Task Force Destiny, helps wounded Afghan National Army soldiers exit a Blackhawk helicopter after they have been rescued in an air mission. (Kandahar, December 12, 2010) Paula Bronstein Afghanistan: Between Hope and Fear 2010 An Afghan National Army battalion marches back to barracks at the Kabul Military Training Center. (Kabul, October 4, 2010) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Eid Muhammad, seventy, lives in a house with a view overlooking the hills of Kabul. He and millions of other Afghans occupy land and housing without possessing formal deeds to them. (Kabul, November 21, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Razima holds her two-year-old son, Malik, while waiting for medical attention at the Boost Hospital emergency room. (Lashkar Gah, Helmand Province, June 23, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Young women cheer as they attend a rally for the Afghan presidential candidate Ashraf Ghani. (Kabul, April 1, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Burqa-clad women wait to vote after a polling station runs out of ballots. (Kabul, April 5, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2015 Relatives, friends, and women’s rights activists grieve at the home of Farkhunda Malikzada, who was killed by a mob in the center of Kabul. Farkhunda was violently beaten and set on fire after a local cleric accused her of burning a Qur’an. (Kabul, March 22, 2015) Paula Bronstein

At least 1,700 people have been killed in attacks carried out by either the Taliban or Isis in the first six months of 2017.

Although the Taliban lost control of Afghanistan following the 2001 US invasion, it has steadily regained ground since the majority of US and allied troops left in 2014, and is now in control of some 40 per cent of the country.

The chaos has also allowed Isis to gain a foothold in eastern provinces.

The unrelenting violence has left many angry with the weak and divided government of President Ashraf Ghani, whom they say is not doing enough to protect the people from extremist violence.

Hundreds attended a protests calling on the president and other high ranking ministers to either combat the violence or resign in Herat on Wednesday night, and more are expected across the country on Thursday, including in the capital Kabul.

In July US President Donald Trump bowed to pressure from the Pentagon to allow the military to set its own troop levels to prevent the precarious security situation from deteriorating further.