From a childhood as a refugee, Captain Safia Ferozi is now flying a transport plane for Afghanistan's air force as the country's second female pilot, a sign of the efforts to bring more women into the armed forces.

Along the way, the 26-year-old Ferozi also married another pilot, who flies in the same unit supporting army ground forces. They are part of a small Afghan air force that is trying to take a greater role in fighting the Taliban insurgency.

“When I wear military uniform, I really, really feel proud of myself as a woman,” Ferozi said while preparing for a flight at the air force base in the capital, Kabul. She flies a C-208, a turboprop plane used as transport for the armed forces.

Nearly 16 years since the collapse of the militant Taliban regime after the US-led invasion in 2001, Afghan women are taking steps to increase their presence in society, including in parliament, government and the military. Still, they face resistance in a deeply conservative society where women are largely expected to stay in the home and where violence against women remains a widespread problem.

When she was a child, Ferozi's family fled from their home in Kabul in the 1990s, during the civil war among Afghanistan's warlords. They took refuge in Pakistan, returning only after the fall of the Taliban.

In high school in post-Taliban Afghanistan, Ferozi saw a TV commercial urging women to join the military. So after graduation she enrolled in the military academy, studying to become a communication officer. Then it was announced at the academy that the air force was looking for women to become pilots.

Ferozi and 12 other women applied, and she was the only one who passed the tests to enter training.

Captain Ferozi sits in her C-208 turboprop plane before take-off (Rahmat Gul/AP)

While she was training at an airfield in the western province of Herat, she first met Capt. Mohammad Jawad Najafi, the pilot who would later become her husband. They married nearly two years ago, and he has since backed her ambitions.

She graduated from training in 2015. She gave birth to their first child, daughter Nergis, now nearly 8 months old, and is back flying missions.

Ferozi is one of only two female pilots in the Afghan air force, but five other women are currently going through training.

In 2013, Capt. Niloofar Rahmani became the country's first woman pilot in more than 30 years and the first to pilot fixed-wing aircraft - there were a few female helicopter pilots during Soviet-backed rule in the 1980s. She is now in the United States training on the far larger C-130 military transport craft.

Ferozi says she hopes to inspire other women.

“As a woman you face many challenges, but you have to deal somehow with all those problems,” she said.

Afghanistan: Between Hope and Fear Show all 16 1 /16 Afghanistan: Between Hope and Fear Afghanistan: Between Hope and Fear 2001 Afghans at the Killi Faizo refugee camp desperately reach for bags of rice being handed out to the thousands who escaped the bombardment in southern Afghanistan during Operation Enduring Freedom. (Chaman, Pakistan, December 4, 2001) Paula Bronstein Afghanistan: Between Hope and Fear 2002 Mahbooba stands against a bullet-ridden wall, waiting to be seen at a medical clinic. The seven-year-old girl suffers from leishmaniasis, a parasitical infection. (Kabul, March 1, 2002) All photos Paula Bronstein Afghanistan: Between Hope and Fear 2003 A mother and her two children look out from their cave dwelling. Many families who, fleeing the Taliban, took refuge inside caves adjacent to Bamiyan’s destroyed ancient Buddha statues now have nowhere else to live. (Bamiyan, November 19, 2003) Paula Bronstein Afghanistan: Between Hope and Fear 2007 Students recite prayers in a makeshift outdoor classroom in the Wakhan Corridor, a mountainous region in northeastern Afghanistan that extends to China and separates Tajikistan from India and Pakistan. (Northeastern Afghanistan, September 2, 2007) Paula Bronstein Afghanistan: Between Hope and Fear 2007 Bodybuilders in the 55-60 kg category square off during a regional bodybuilding competition. Many Afghan men, like others around the world, feel that a macho image of physical strength is important. (Kabul, August 6, 2007) Paula Bronstein Afghanistan: Between Hope and Fear 2008 A woman in a white burqa enjoys an afternoon with her family feeding the white pigeons at the Blue Mosque. (Mazar-e-Sharif, March 8, 2008) Paula Bronstein Afghanistan: Between Hope and Fear 2009 Addicts inject heroin while trying to keep warm inside the abandoned Russian Cultural Center, which the capital city’s addicts use as a common gathering point. Heroin is readily available, costing about one dollar a hit. (Kabul, February 9, 2009) Paula Bronstein Afghanistan: Between Hope and Fear 2009 An elderly man holds his granddaughter in their tent at a refugee camp after they were forced to flee their village, which US and NATO forces had bombed because, they claimed, it was a Taliban hideout. (Surobi, Nangarhar Province, February 7, 2009) Paula Bronstein Afghanistan: Between Hope and Fear 2009 Seven-year-old Attiullah, a patient at Mirwais Hospital, stands alongside an X ray showing the bullet that entered his back, nearly killing him. Attiullah was shot by US forces when he was caught in a crossfire as he was herding sheep. (Kandahar, October 13, 2009). Paula Bronstein Afghanistan: Between Hope and Fear 2010 US Army Sargeant Jay Kenney (right), with Task Force Destiny, helps wounded Afghan National Army soldiers exit a Blackhawk helicopter after they have been rescued in an air mission. (Kandahar, December 12, 2010) Paula Bronstein Afghanistan: Between Hope and Fear 2010 An Afghan National Army battalion marches back to barracks at the Kabul Military Training Center. (Kabul, October 4, 2010) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Eid Muhammad, seventy, lives in a house with a view overlooking the hills of Kabul. He and millions of other Afghans occupy land and housing without possessing formal deeds to them. (Kabul, November 21, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Razima holds her two-year-old son, Malik, while waiting for medical attention at the Boost Hospital emergency room. (Lashkar Gah, Helmand Province, June 23, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Young women cheer as they attend a rally for the Afghan presidential candidate Ashraf Ghani. (Kabul, April 1, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2014 Burqa-clad women wait to vote after a polling station runs out of ballots. (Kabul, April 5, 2014) Paula Bronstein Afghanistan: Between Hope and Fear 2015 Relatives, friends, and women’s rights activists grieve at the home of Farkhunda Malikzada, who was killed by a mob in the center of Kabul. Farkhunda was violently beaten and set on fire after a local cleric accused her of burning a Qur’an. (Kabul, March 22, 2015) Paula Bronstein

There are around 1,800 women serving in Afghanistan's 195,000-member military, according to Gen. Mohammad Radmanish, deputy Defense Ministry spokesman. The military, which is heavily backed by the US and NATO, is working to bring the number up to 10 percent of its ranks over the next seven years, he said.

Afghanistan's small air force - just over 100 aircraft - received little attention for years, but in 2015 NATO and the US began focusing on building it up with increased training and equipment. The force has attack helicopters and light attack planes that have been flying combat missions this year, though NATO militaries carry out the vast majority of strikes in the fight against insurgents.

The other major role for the air force is in emergency humanitarian missions, helping those hit by flooding, avalanches, landslides or other disasters.