An all-girl team of roboticists will watch their creations compete in a US competition via Skype after being denied visas to enter the country.
President Trump recently ordered a ban on travel from six Muslim-majority countries, but Afghanistan was not included on the list.
Teams from Iran, Sudan and Syria – which are on the list – did manage to enter the country.
A US State Department official said it could not discuss individual cases.
The six-member team watched their ball-sorting robot compete in Washington DC via a video link from their hometown of Herat, in western Afghanistan.
“We still don’t know the reason why we were not granted visas, because other countries participating in the competition have been given visas,” Fatemah Qaderyan, 14, told Reuters.
She was one of the team members who made two journeys to the US embassy in the Afghan capital, Kabul, to apply for their papers.
Team-mate Lida Azizi, 17, said: “All of the countries can participate in the competitions, but we can’t. So it’s a clear insult for the people of Afghanistan.”
The First Global competition saw teams from 164 countries compete in a series of robotic games.
The non-profit organisation aims to promote Stem subjects (science, technology, engineering and maths).
First Global’s president, Joe Sestak, said in a post on the organisation’s Facebook page that he was “saddened” by the US decision, adding his own thoughts as to why the girls had been refused visas.
“Visa decisions are often made regarding many whose lives are endangered,” he wrote. “This is compounded by the low number of visas available within the nation to begin with.”
A group of Afghan girls based in the US will represent the team, and the Skype call will be broadcast on a big screen at the event.
A team from The Gambia also failed to gain visas.