Updated

Twice rejected for U.S. visas, an all-girls robotics team from Afghanistan arrived in Washington early Saturday after an extraordinary, last-minute intervention by President Donald Trump.

The six-girl team and their chaperone completed their journey just after midnight from their hometown of Herat, Afghanistan, to enter their ball-sorting robot in the three-day high school competition starting Sunday in the U.S. capital. Awaiting them at the gate at Washington Dulles International Airport were a U.S. special envoy and Afghan Ambassador Hamdullah Mohib, who described it as a rare moment of celebration for his beleaguered nation.

"Seventeen years ago, this would not have been possible at all," Mohib said in an interview. "They represent our aspirations and resilience despite having been brought up in a perpetual conflict. These girls will be proving to the world and the nation that nothing will prevent us from being an equal and active member of the international community."

In the short time since their visa dilemma drew global attention, the girls' case has become a flashpoint in the debate about Trump's efforts to tighten entrance to the U.S., including from many majority-Muslim countries. Afghanistan isn't included in Trump's temporary travel ban, but critics have said the ban is emblematic of a broader effort to put a chill on Muslims entering the U.S.

The girls' story has also renewed the focus on the longer-term U.S. plans for aiding Afghanistan's future, as Trump's administration prepares a new military strategy that will include sending more troops to the country where the U.S. has been fighting since 2001. Defense Secretary Jim Mattis said Friday the strategy was moving forward but "not finalized yet."

Trump's personal intervention earlier in the week using a rare "parole" mechanism to sidestep the visa system ended a dramatic saga in which the team twice traveled from their home in western Afghanistan through largely Taliban-controlled territory to Kabul, where their visa applications were denied twice.

The U.S. won't say why the girls were rejected for visas, citing confidentiality. But Mohib said that based on discussions with U.S. officials, it appears the girls were rebuffed due to concerns they would not return to Afghanistan. It's a fate that has beset many Afghans seeking entry to the U.S. in recent years as continuing violence and economic challenges lead many to seek asylum in America, or to travel through the U.S. to Canada to try to resettle there.

As their case gained attention, Trump intervened by asking National Security Council officials to find a way for them to travel, officials said. Ultimately the State Department, which adjudicates visa applications, asked the Homeland Security Department to let them in on "parole," a temporary status used only in exceptional circumstances to let in someone who is otherwise ineligible to enter the country. The U.S. granted parole after determining that it constituted a "significant public benefit."

Ambassador Alice Wells, the acting U.S. special envoy for Afghanistan and Pakistan, downplayed concerns that the girls might use the parole to stay in the U.S. or go to Canada. As she drove to the airport to greet the girls, she said by phone that they were proud to represent Afghanistan and "proud to return to be role models to others around them."

Competing against entrants from more than 150 countries, the girls will present a robot they devised that can recognize blue and orange and sort balls into correct locations. They'll also be feted at a hastily arranged reception at the Embassy of Afghanistan attended by supporters who had petitioned the U.S. to let them in.

The Taliban, ousted by the U.S.-led coalition in 2001, denied schooling to girls when they ruled the war-torn country. Wells said that since 2002, the number of Afghan children attending school has increased from about 900,000 — virtually all boys — to 9 million today including 40 percent girls.

"We're looking to ensure that Afghanistan continues its trajectory to stabilizing politically and economically," Wells said. "It's young women like these that are going to be the future of Afghanistan."