A U.S. travel ban is in place for people travelling from six majority-Muslim countries.
Department of Homeland Security spokesman David Lapan said the US Citizenship and Immigration Services approved a Department of State request for six girls from the war-torn country to be allowed in, along with their chaperone, so they can participate in the competition.
As a result, all 163 teams from 157 countries are able to participate in the event being held on July 16 in Washington DC. "That is why I am most grateful to the U.S. Government and its State Department for ensuring Afghanistan, as well as Gambia, would be able to join us for this worldwide competition this year".
A senior administration official said Donald Trump then raised the issue with his security advisor while at the G20 summit in Germany, and asked if there were additional measures that could've been taken.
The State Department worked with Homeland Security on this specific case. Farooqi and her teammates worked seven days a week, for six months, to build their robot, and twice made the unsafe 500-mile trip from Herat to the U.S. Embassy in Kabul.
"We just wanted to show the power and skills of Afghan girls to Americans", 14-year-old Fatema Ghaderyan told the Associated Press.
The girls wrote on their competition page: "We want to make a difference, and most breakthroughs in science, technology and other industries normally start with the dream of a child to do something great". "We applied again for the USA visa and we were rejected again".
Without the reversal, the team would have had to watch the contest via video link from their hometown in Herat, Afghanistan.
The three-day robotics competition begins Sunday in Washington. Sestak said the State Department was a "star player" in the entire process of coordinating travel for the competing teams, but he had no direct knowledge of Trump's involvement.
"Teams under the Executive Order on travel such as Iran, Yemen, Sudan, Libya, and a team of Syrian refugees have all recently received their visas even after parts of the E.O".