In a tumultuous year, a group of teenage girls from Afghanistan became the unexpected heroes of an underdog story that captivated the entire world.

It all began in June, when the all-female team of high schoolers was denied US visa necessary for their participation in July’s FIRST Global Challenge, an international robotics competition in Washington DC. In order to interview for their visas, the six teens traveled 500 miles across the country to the American embassy in Kabul, an area of the city where over 90 were killed in a May suicide bomb attack.

Roya Mahboob, Afghanistan’s first female tech CEO and the force behind the robotics team, told Forbes that when the girls learned their visas had been rejected, “they were crying all day.”

But at the 11th hour, it was President Trump who ultimately stepped in and permitted the young engineers to enter the country and pit their ball-sorting robot against the 163 other competing teams’ inventions. Fittingly, the young women came home with medals for “courageous achievement.”

It was a happy ending to a story of perseverance. Except, it wasn’t an ending at all. The Afghan girls’ robotics team was just getting started.

In late November, three members of Team Afghanistan took first place at Robotex, one of the largest and toughest robotics competitions in Europe. The New York Times reported that the girls’ prizewinning creation was a machine that harnessed solar energy to help small farmers: a tech innovation for social good.

In the interim, the teens have faced personal challenges likely unthinkable to a majority of their competition. The young engineers’ home of Afghanistan continues to endure the devastating destruction of war — a war that began before some of the girls were even born. And in August, the team captain’s father was killed by a suicide bomber.

The STEM field is tough for girls, period. But for the young women of Team Afghanistan, the obstacles that stand in the way of their engineering dreams are formidable. Their perseverance, drive, and tenacity to follow through aren’t just an example for young girls pursuing STEM or women breaking into male-dominated professions. No, Team Afghanistan is a model for us all to harness our every iota of inner fortitude to make a better world, even in the face of calamity.

This piece is part of our new project “Year in Women.” Check out all the women featured:

(Photos by Alex Wong/Getty)