Two suicide bombers blew themselves up after firing on worshippers inside the mosque, a Herat provincial spokesman told CNN.
ISIS took responsibility for the attack Wednesday in a series of messages sent to Telegram channels associated with the group.
The all-girl robotics team flew to the United States in July to take part in an international competition with students from nearly 160 countries.
At the competition, the team received the silver medal in the Rajaâ Cherkaoui el Moursli Award for Courageous Achievement.
In addition, the girls were given congressional records detailing their journey to America by Sen. Jeanne Shaheen.
"You are an inspiration to all of us," the New Hampshire Democrat told them.
Attack condemned as 'deplorable'
Writing Thursday on Twitter, Hamdullah Mohib, Afghanistan's ambassador to the United States, said his heart went out to Fatima for the loss of her father.
"We will defeat the forces trying to dismantle our future," he wrote.
The US Embassy in Afghanistan condemned the attack Thursday as "deplorable."
"We send our deepest condolences to the families and friends of those killed and injured," a statement said. "We commend the government and security forces ... for their response to this latest act of cowardly violence."
Tuesday's bombing was among a series of recent deadly attacks on civilians and armed forces in Afghanistan by terrorist groups.