The girls on Afghanistan's national soccer team were anxious. For weeks, they had been moving around the country, waiting for word that they could leave.

One wants to be a doctor, another a movie producer, others engineers. All dream of growing up to be professional soccer players.

Then the message finally came early Sunday: A charter flight would carry the girls and their families from Afghanistan - to where they didn't know. The buses that would take them to the airport were already on their way.

“They left their homes and left everything behind,” Farkhunda Muhtaj, the captain of the Afghanistan women's national team who from her home in Canada had spent the last few weeks communicating with the girls and working to help arrange their rescue, told The Associated Press. “They can't fathom that they're out of Afghanistan.”

Since the U.S. withdrawal from Afghanistan, the girls, ages 14-16, and their families, had been trying to leave, fearing what their lives might become like under the Taliban - not just because women and girls are forbidden to play sports, but because they were advocates for girls and active members of their communities.

Late Sunday, they landed in Lisbon, Portugal.

In interviews with the AP this week, Muhtaj, members of the soccer team, some of their family members, and soccer federation staff, spoke about their final days in Afghanistan, the international effort to rescue them and the promise of their newfound freedom.

The rescue mission, called Operation Soccer Balls, was coordinated with the Taliban through an international coalition of former U.S. military and intelligence officials, U.S. Sen. Chris Coons, U.S. allies, and humanitarian groups, said Nic McKinley, a CIA and Air Force veteran who founded Dallas-based DeliverFund, a nonprofit that's secured housing for 50 Afghan families.

“This all had to happen very, very quickly. Our contact on the ground told us that we had a window of about three hours,” said McKinley. “Time was very much of the essence.”

Operation Soccer Balls had suffered a number of setbacks, including several failed rescue attempts, and a suicide bombing carried out by Islamic State militants, the Taliban's rivals, at the Kabul airport that killed 169 Afghans and 13 U.S. service members. That bombing came during a harrowing airlift in which the U.S. military has acknowledging it was coordinating to some extent with the Taliban.

Complicating the rescue effort was the size of the group - 80 people, including the 26 youth team members as well as adults and other children, including infants.

Robert McCreary, a former congressional chief of staff and White House official under President George W. Bush who has worked with special forces in Afghanistan and helped lead the effort to rescue the national girls soccer team, said Portugal granted the girls and their families asylum.

“The world came together to help these girls and their families,” said McCreary. “These girls are truly a symbol of light for the world and humanity.”

The Taliban have tried to present a new image, promising amnesty to former opponents and saying they would form an inclusive government. Many Afghans don't trust those promises, fearing the Taliban will quickly resort to the brutal tactics of their 1996-2001 rule, including barring girls and women from schools and jobs.

This week, the Taliban set up a ministry for the “propagation of virtue and the prevention of vice” in the building that once housed the Women's Affairs Ministry, the latest sign that it is restricting women's rights.

As the girls moved from safehouse to safehouse, Muhtaj, who is also a teacher, said she helped them stay calm through virtual exercise and yoga sessions and by giving them homework assignments, including writing autobiographies.

She said she couldn't share details about the rescue mission with the girls or their families and asked them to believe in her and others “blindly.”

“Their mental state was deteriorating. Many of them were homesick. Many of them missed their friends in Kabul,” said Muhtaj. “They had unconditional faith. We've revived their spirit.”

Some of the girls spoke to the AP through an interpreter. They said they want to continue playing soccer - something they were urged to not do while they were in hiding - and hope to meet soccer superstar Cristiano Ronaldo, Manchester United's forward and a Portugal native.

Wida Zemarai, a goalkeeper and coach for the Afghanistan women's national soccer team who moved to Sweden after the Taliban ascended to power in 1996, said the girls were emotional after their rescue.

“They can dream now,” Zemarai said. “They can continue to play.”