This year at FIRST Global Challenge, a robotics competition in Washington, D.C., an international committee of judges will assess the creativity and collaboration of 163 teams from 157 nations focused on tackling the global water crisis. From Sunday through Tuesday, the teams will present robots designed to clean contaminated water, as represented in a simulation by colored balls.

One of the groups attending consists of six teenage girls from Herat, a city in western Afghanistan near the border with Iran. (They will present a device that can recognize and sort balls of different colors.) These young women, who range in age from 14 to 16, know the ravages of water crises firsthand. Indeed, Afghanistan and Iran, which share a border, are just now trading barbs about water usage.

That the girls are able to attend at all is a political miracle. Despite winning a spot in the event, they were turned down twice by the U.S. consulate when they sought visas to come to America, once in May and again in June. Even after traveling to Kabul to try to obtain them, the girls joined their Gambian counterparts as the only teams turned down by local U.S. consulates. This, even though nearly 10,000 U.S. soldiers remain in Afghanistan—with more likely heading there before the year is out—in what has become America’s longest-ever war. As part of America’s presence in Afghanistan, it has invested heavily in girls’ education, maternal health, and the broader issue of women’s rights. These investments are frequently cited by U.S. leaders as measures of the country's progress. Yet it took sustained pressure on and from Washington leaders to bring these six girls, who embody their nation’s forward movement over the past 16 years, to the United States.

On Tuesday, a congressional letter signed by more than 50 members of Congress urged Secretary of State Rex Tillerson to reconsider the decision to bar the girls. Then, on Wednesday, word broke that the Trump White House itself would intervene to get the visas approved.The State Department worked incredibly well with the Department of Homeland Security to ensure that this case was reviewed and handled appropriately,” Deputy National Security Adviser for Strategy Dina Powell said in a statement issued on Wednesday. “We could not be prouder of this delegation of young women who are also scientists—they represent the best of the Afghan people and embody the promise that their aspirations can be fulfilled.” (The Gambian team has also been cleared to attend.)

For the Afghans working to build this team, the high-profile attention and approval meant a great deal after several weeks of disappointment and dashed hopes. The team had worked for months, and come up against the challenges of the old and real world: the conservative society from which they came, and the security risks people representing the U.S. government viewed them as posing.  And then, suddenly, the same government that denied them the chance to compete reversed itself.

The girls “are very talented and we are very happy the U.S. didn’t ignore us and they are giving us the option to come here,” Roya Mahboob, an Afghan tech entrepreneur who serves as one of the team’s sponsors told me. “It will be … an inspiration for other girls to follow these girls [into studying] mathematics and robotics.”

Immigration, visas, and foreign visitors, have consumed a great deal of attention since Trump’s election and subsequent anti-Muslim travel ban. But Afghans’ difficulty in securing visitor visas to America began well before the Trump administration, out of concerns stemming from people who came to the country and then either sought asylum in Canada or simply skipped out on their visas.

In late 2015, for example, the Thunderbird School of Global Management’s Thunderbird for Good program, which has offered business training to Afghan women entrepreneurs since 2004, put forward 14 names for visas to attend its two-week program at the school’s Phoenix campus. A few months later, they got their answer: zero yes’s, 11 no’s, and three maybe’s. “We were totally shocked,” Kellie Kreiser, executive director of Thunderbird for Good, told me.

Eventually, she learned that visas had become more difficult to come by—even Fulbrighters were being turned down. Government officials “didn’t know who was going and who was staying, and they had so many people who were seeking asylum or skipping out that they had to ratchet [the administering of visas] down,” she said. “It was a legitimate response to something they couldn’t get a handle on anymore. I cannot fault them for that.” Kreiser and her team moved the session to India so that the women they selected would still have access to Thunderbird’s training.

The entrepreneurs didn’t lose out, as they still got the training they sought. But even fewer Americans—including policy makers—got to meet them, to hear their stories, and to speak in person with these entrepreneurs working towards their country’s future.

Some see at least one bright spot in the Trump administration’s reversal on the visas for the Afghan robotics team: Americans, long accustomed to a narrative that has bled into caricature—that Afghanistan is a basket case which remains in the stone age—can now see for themselves a new generation of Afghans fighting for a different future. Young people who want to be connected to the world, who see something other than war as a possibility for their nation.

“At 16 I [only] had the option [of knowing] what a computer is. But for these girls that are 16, they are building robots and they are coming to the States to compete with other countries,” Mahboob said. “It is huge compared to 12 years ago.”

The abrupt policy change on the visa issue came about after sustained media attention. While Afghanistan was never part of Trump’s travel ban, the questions about who can come and for what reason send a message as America prepares to send more troops back to Afghanistan.

For Americans who have worked to raise money for development programs in Afghanistan, there is some vindication in all this high visibility. “It has shown that there are Afghan women who are advanced enough in technology to be able to compete … that is a big reveal for a lot of people, that there has been progress, especially in education, in Afghanistan,” Toni Maloney, CEO of Business Council for Peace, which since 2004 has supported and mentored small business owners in Afghanistan, told me. “We do have to credit the past work of a lot of non-profits, the State Department and their own exchange programs, and USAID. There has been a lot of money invested and a lot of time. And so it is hard won by anybody’s standards.”

Mahboob echoed the idea that Afghanistan is changing, and said technology is a part of that shift. “Technology gives us access to new realities,” she said. “It allows us to dream further.”