Afghanistan’s equivalent of Pop Idol is the country’s most popular programme, drawing 12m viewers — close to half the population. For the first time, a woman is in the final — an 18-year-old schoolgirl in a long brocade dress is up against a rapping barber in a New York Yankees baseball cap, leather jacket and sunglasses.

It’s a scene that would have been impossible 16 years ago — before the American-led invasion toppled the Taliban government — and looks to be the perfect example of a new, more liberal Afghanistan. But the recording is being held inside a bunker at the TV station compound, heavily protected by gun-toting guards and an armoured personnel carrier. The audience have arrived via a steel door, a police checkpoint and x-ray machines. The judges have to travel in bulletproof vehicles.

The West spent $1 trillion and sacrificed thousands of lives promising a bright new world for Afghan women. When the Taliban was beaten, boasted President George W Bush and Tony Blair, females would be free, whether to run for office or sing and dance in public without fear for their safety. Yet since Nato pulled out most of its forces from Afghanistan at the end of 2014, the security situation has deteriorated once again, with a resurgent Taliban controlling much of the countryside. A record 1,662 civilians were killed in the first six months of this year, according to UN figures, and the number of women casualties rose by 23%. The situation is particularly bad in the capital, Kabul, where a car bomb killed another 31 people at the end of last month.

This is the 12th series of Afghan Star, and it wasn’t always like this. Past recordings were held in cavernous wedding halls around the country, attended by enormous crowds. That changed when the Taliban condemned the series for “obscenity and lewdness” and put Tolo TV, the commercial television station that makes the show, on their hit list. Seven Tolo employees were killed last year when their minibus was blown up by a suicide car bomber.

Sitting in the green room, Zulala Hashemi, the female finalist, believes it is worth the risk. “I used to watch it and dream of being on Afghan Star,” she says. “I never imagined I’d reach the final.”

To get there she has been singing every week for more than three months, as more than 1,000 contestants were whittled down to two. Now, she nervously twiddles the large orange plastic ring on her right hand as her mother, Mirman, touches up her elaborate make-up.

“I think for every three women in Afghanistan, two are supporting her and one is jealous,” says Mirman, who was widowed when Zulala was just three months old. To raise her six daughters and a son, Mirman wove carpets — the Taliban allows women to do little else — and is determined their lives should be different. But many of Zulala’s family, including her brother, are horrified. The family are from the conservative city of Jalalabad in east Afghanistan, where neighbouring districts are strongholds of the Taliban and Isis.

Each time mother and daughter leave the studio they put on burqas to avoid being recognised. “We cover our faces so people won’t disturb us,” says Zulala. They have also blocked correspondence to their phones, email and Facebook pages because they received so many threats.

The West made a lot of promises to Afghan women, but what they said meant nothing. Security-wise, things have got worse

“If you don’t protect yourself, the government won’t protect you,” says Mirman, who narrowly escaped being blown up when running unsuccessfully for the local council. “The West made a lot of promises to Afghan women, but what they said meant nothing. Security-wise, things have got worse.”

While Zulala has to hide her face to avoid abuse, her rival for the prize revels in being spotted. “People recognise me in the street and give me a thumbs up,” says Sayed Jamal Mubariz, 23. “It’s a great feeling.”

A barber from the northern city of Mazar-i-Sharif, he started rapping two years ago under the name Scream of Freedom, after hearing Persian rap from neighbouring Iran. “I realised it was a way of revealing problems through songs,” he explains. “I sing when I am cutting hair. I rap about unemployment, the bad economy, lack of security …”

Eventually, after hours of singing, soft-drink adverts and a random reunion between the presenter and his father, who has been flown in, the two finalists step onto the stage for the announcement of the public phone vote. Dramatic music plays.

It isn’t a game-changing result. As fireworks fountains go off around the stage and confetti falls, Zulala is in tears. The prize is a motorbike and a trip to Kazakhstan, neither of which would have been much use to an Afghan woman anyway. Gallantly — after a nudge from the presenter — Mubariz hands over the golden star trophy to her, garnering more cheers.

“Afghanistan was not ready for a woman star,” Mirman shrugs. She and her daughter put on blue burqas so they are once more indistinguishable from most women outside.

If there is one place that most symbolises the challenges for Afghan women, it is in the centre of Kabul, about a mile from the presidential palace, on a traffic-clogged road that runs alongside the Kabul River. At one end is a blue-domed mosque and shrine to Shah-do Shamshira, the King of Two Swords, flocked with pigeons fed by families with paper cones of corn. On a platform overlooking the rubbish-filled riverbank stands a tall, grim monument topped by a clenched fist. The railings are hung with horrific pictures of women with faces scarred from acid attacks or burns from setting themselves alight — suicide attempts by self-immolation.

An old man passes pushing a wheelbarrow of songbirds in wooden cages, while a beggar on crutches with a withered leg holds out a tin and weaves between cars. Most people hurry past. Everyone knows something terrible happened here.

It is at this spot, at about lunchtime on March 19, 2015, that a 27-year-old trainee teacher called Farkhunda Malikzada was beaten to death by a mob. She was on her way to a Koran class when she saw a man selling pagan amulets at the shrine and complained to the custodian. He started shouting that she was burning the Koran and an angry crowd gathered.

Gruesome mobile-phone footage shows men repeatedly stamping on Farkhunda’s body and pummelling it with rocks as others rushed to join in, shouting, “Allahu akbar!” Police standing nearby did nothing until it was too late, despite her desperate cries. The mob then ran over her body with a Toyota hatchback, threw her corpse onto the riverbank and set it alight.

The murder is even more chilling for the fact that it was not carried out by Taliban from remote villages, but young urbanite Kabulis, who then posted the footage on YouTube.

Though the horror of what happened here on a busy street in broad daylight proves just how dangerous life still is for Afghan women, some hope was generated at Farkhunda’s funeral, where her coffin was carried by women in brave defiance of a long-held tradition.

One of those women was Rada Akbar, a freelance photographer. “When I read on Facebook what happened to Farkhunda, I felt they killed part of my body too,” she says. “It was beyond horrible. I messaged my friends, saying we needed to do something, and we went to her home. We hadn’t planned anything, but when we saw the coffin we all felt we didn’t want men to touch her body. So her father and brother said, ‘OK, this is your sister, you can carry her.’ ”

Farkhunda’s killing prompted demonstrations around Afghanistan and international outrage. Under pressure, the government quickly agreed a trial and for the first time allowed TV cameras in court. Kimberley Motley, an American lawyer who has long worked in Kabul, represented the victim’s family.

“It was the best trial I have seen in Afghanistan, with proper testimony and evidence,” Motley says. “Everyone seemed to be watching it. I was getting stopped in the street by Afghans with questions about the law.”

Of the 49 men standing trial, four received death sentences and eight were given 16-year sentences. Eleven police officers also received sentences for their failure to defend Farkhunda.

At the time, some described it as a defining moment in Afghan women’s rights. However, when it went to appeal last year, Motley says she was pressured to get off the case by the presidency, which also sought to coerce Farkhunda’s family. This time, the hearing was behind closed doors. The sentences were reduced and only 11 men remain in jail. “No one I know has set eyes on the legal decision,” Motley says.

Farkhunda’s family received so many threats that the police checkpoint outside their house was no longer enough. They had to flee the country.

“The government told us they couldn’t protect us and we should leave,” says her brother Mojeeb Rahman, speaking from Tajikistan. “It’s been very difficult for the family. We did nothing, we were the victims — yet we had to flee.

“My sister was kind, sweet and beautiful,” he adds. “I don’t know how anyone could do what they did. And why didn’t anyone help when she was crying, ‘Don’t hurt me’?”

Their mother, he says, has not recovered and seeing most of Farkhunda’s attackers released left her in despair. In fact, he says, the main culprits were never arrested, even though their faces were clearly identifiable in the footage of the attack.

Rada and her fellow female coffin bearers were also horrified to see the killers go free. “The fact that the mob was released made us scared,” she says. “Anything that happens to us women, the authorities do nothing.”

One Afghan woman trying to change that is Najla Raheel, the chairwoman of a panel of five lawyers who took over representing Farkhunda’s family from Motley.

A taxi drops me outside a half-built shopping centre and I assume I must have arrived at the wrong address. The only tenants on the first two floors are building suppliers and a tile merchant, but then on the third floor I find a small waiting room where a woman in black is crying quietly. Across the corridor, Najla sits at a dark wood desk, beside a cabinet of law books. There is a power cut, so the window is open for air and it is hard to hear because there is so much hammering from the street of metal workshops at the rear.

“I knew it was a very risky mission,” Najla says. “But when President Ghani asked the Bar Association for someone to defend this case, I thought if we don’t give the right punishment to the killers, then it will mean anyone can do the same or even worse.”

However, she admits: “It hasn’t gone as we wanted. Most people spent only two or three months in jail because they had influential people intervening. The government released them, saying they were innocent, but we don’t think so. And three others have never been to court who we think are the main people — the ones who stoned her, burnt her, crushed her with the car.”

I get calls from different numbers warning they will spray acid in my face if I don’t withdraw from the case. Here, everything is controlled by men

Najla has received so many threats, she has had to employ private bodyguards. “I get calls from different phone numbers warning they will spray acid in my face if I don’t withdraw from the case,” she explains. “I am lucky my husband supports me and says, ‘Don’t be afraid.’ ”

She has asked the government to reopen the case, but has little hope. “Here, everything is controlled by men.”

While we are talking, a woman in black and yellow comes into the office, crying. “Forced marriage,” Najla shrugs after she has gone. “Her husband is so old, he has daughters older than her and he beats her. She wants a divorce, but he won’t agree. I have two or three hundred case files, all women suffering violence,” she continues. “It makes me very depressed about Afghanistan.”

The lady from the waiting room comes in, her long black coat closed with a pearl clip. Her name is Laila and she wants to divorce her husband — a drug addict who beats her. “He uses heroin and alcohol and is very dangerous,” she explains.

When they first married, he had a good job in the computer department of the ministry of security, but absences caused by his addiction led to his dismissal. “He would demand money for drugs, then torture me if I didn’t give it to him.”

Ten months ago, he beat her so badly that she finally left him. However, he refuses to divorce her. “He says he loves me a lot,” she tells me. He took their two children of five and three. “I want my boys back,” she cries, showing me their pictures on her phone.

After I return home, I hear from Laila on WhatsApp. She got her divorce, but her ex-husband still refuses to let her see the children. “This is no country for women,” she messages.

Her cry for help is not unusual. Almost every day I get WhatsApp messages from desperate Afghan women I have met during my time reporting in the country, many of them prominent figures. “Christina, they will kill me. What should I do?” reads one from a female Afghan MP who says she is living in absolute fear from a governor who raped her. “A huge explosion happened under my car and I almost died.”

While western diplomats tweet smugly about the Afghan girls’ robotics team going to Washington, these messages reveal the daily reality for Afghan women.

Back in Kabul, I meet female journalists forced to live in shelters, including one who is covered in cigarette burns inflicted by her own brother who tried to stop her working. Others have fled, including Shakila Ebrahimkhil, a fearless reporter often first on the scene after suicide bombings. In 2012, she broke the story of Sahar Gul, a child bride who was locked up and tortured by her husband and in-laws after she refused to be forced into prostitution. Shakila’s work in highlighting the suffering of women in Afghanistan led to her receiving repeated death threats from militants. Last year, she fled to Germany.

She is not the only female role model to have been driven out. In 2013, Niloofar Rahmani, then aged 21, became the first woman to earn her wings in Afghanistan’s air force. The more she was feted internationally as a symbol of female empowerment, the more she drew criticism and threats at home — not just to her, but to her family, who have had to move house several times. Finally, just before Christmas while on a training course in America, she requested asylum. “There is a war against the female in Afghanistan,” she said.

In Jalalabad, the home town of the Afghan Star finalist Zulala Hashemi,I meet some female journalists who are determined to stick it out.

In the centre of town a heavily guarded entrance marks the driveway to the Shaiq Media Center, home to Sharq TV, a private television station. The blue-glass building has been attacked six times since 2009 — by grenade and Kalashnikov fire, a suicide bomb, rockets and RPGs, and a petrol bomb.

“All the attacks have happened on the same side, where the women’s radio is,” says the station’s owner, Shafiqullah Shaiq.

Aside from Sharq TV, the network runs Nargis Radio, the first radio station for women in eastern Afghanistan, run by his wife, Shahllah. It started in 2007 with a programme called Women in the Community. “We felt women in the city know their rights, but not those in rural areas where they are living under strict Pashtun traditions,” Shahllah explains.

They set up a hotline, which women could call with any problems. “Everyone said this isn’t possible,” Shahllah says. “After the first show, I got women calling to share their opinions and stories. It was like an empowerment programme. Women even started turning up at the radio station.”

Many had been beaten by their husbands. Some were victims of child marriage, where girls as young as nine are handed over to resolve tribal conflicts, an extremely common issue that is rarely discussed publicly. A law banning violence against women was introduced eight years ago, but it has yet to be granted parliamentary approval — 87% of women suffer domestic abuse and at least 60% of marriages in Afghanistan are said to be forced.

Sometimes Shahllah and her reporters even went in disguise to the homes of abused women to help them. “One girl of 13, Gul Nagha, called me begging for help. She had been forced to marry a man and was being treated as a slave by his family. They would shout at her, burn her with iron rods and had ripped out all her hair. She said, ‘Within two or three days, I will be dead.’ I spoke to my husband and he said this is very dangerous. But how could I not help?”

She told the girl to make an excuse to leave the house, where she would be waiting outside in disguise. Shahllah and her most experienced reporter headed to the remote area and rescued the girl, then took her to the ministry of women’s affairs.

“We were terrified all the way back,” she says. “When the girl’s husband and mother-in-law found out, they tried to get the girl’s family jailed. But the girl told the women’s ministry everything and her mother came to back her story. Then I took her to hospital in Kabul and arranged for her to stay in a shelter. A couple of years later, someone called and said a beautiful girl has come to see you. It was her!”

In a country where most people are illiterate and electricity is rare, radio is still the most powerful medium. The Taliban and Isis both have radio stations in Nangarhar province, where Nargis Radio broadcasts. As the Taliban grew stronger in the region, they were not about to put up with a station promoting women’s rights and started issuing threats. Initially the Shaiqs paid little attention, but then came a rocket attack on the building.

A campaign of attacks followed. Warnings have been issued on Isis radio and the women receive lots of phone threats. “It’s not just Taliban and Isis,” says Shahllah. “Many men call and say you are misguided about women and must stop your radio.”

Last year, threats to kill them became so severe, the show was dropped. The station has continued, but 10 female reporters quit.

“Right now, I have only six girls because of the risk,” says Shahllah. “We asked the government for security, but they don’t help.”

Those who remain at the station insist they will not be frightened off. “Sometimes they drop warning letters at my house, saying you should leave your job,” says Nafisa Saher, 24, one of the presenters. “I told my family these are bad people who don’t want us to achieve anything. Otherwise, we would just stay at home and do nothing, like under Taliban times.”

Her colleague Sabah Gul, 47, nods vigorously. She is a law graduate and mother of three grown-up sons, whom she brought up after her husband was killed 24 years ago. She had always wanted to be a journalist, so when she heard about the station opening she rushed to join. “My sons beg me not to do this, they say our father was killed and we have only you,” she explains. “But I’m worried about the bad situation of women and want to give them awareness so they have a better future.”

All of them fear the situation for women is deteriorating. Though the war continues, Nato forces, which once numbered 140,000, are now down to 13,000, mostly in Kabul. Many aid workers have pulled out.

“Before, there was a lot of hope,” says Shahllah. “But today the life of an Afghan woman is like playing with fire.”

The dangers were brought home last August when her only daughter, Heena, was in a class at the American University in Kabul when Taliban gunmen stormed the campus killing 16, including eight students and two professors. When the university recently reopened, she insisted on returning. “The new generation of women won’t be defeated,” says Shahllah.

At Nargis Radio, they were cheering on Zulala in Afghan Star — and were devastated when she lost. “I think she can’t stay in Jalalabad,” says Sabah Gul. “They don’t accept female journalists here. How would they accept female singers?”

The Afghan women cycling for freedom

In a country that has gone through almost 40 years of war, it is rare to see happiness. It is also very rare to see female cyclists. For pure joy, nothing beats the smiles on the faces of Nasrine Nawa, Maryam Yusufi and Rukhsar Habibzai as they speed through the streets of Kabul. Men shout insults and “Go home!” But others shout “Bravo!”

“When I’m on the bike, I feel like I am flying,” says Rukhsar, 19, a medical student who has been cycling for three years. “People throw stones. But I want to show the world Afghan women have power and can do anything.”

Her family supports her — they gave her the shiny bike she is riding for her birthday. The others are using bikes that came from donations raised by Shannon Galpin, a cycling-mad American film-maker who was working in Afghanistan and astonished to come across an Afghan girls’ team. It was run by Abdul Sadiq Sadiqi, a 62-year-old teacher and cyclist, who founded the Afghan Cycling Federation. He first formed a girls’ team in the 1980s, but it ended when the Taliban took over in 1994. After they were ousted in 2001, he took his daughter riding with him and gradually other girls joined. Now they meet every Friday at his home in southern Kabul.

“Girls are free to ride bikes in practice,” he says. “It was hard at first. We had to persuade their families. Even now, some complain.”

Two of the girls, Mariam and Sadef, were deliberately knocked off their bikes by two men on a motorcycle. The others seem unfazed. Nasrine, 22, and Maryam, 21, are no strangers to threats as hosts on a TV show.

“Every day when I say goodbye to my mum, I don’t know if I will come back,” Nasrine shrugs.

The best girls compete overseas. At the Tour de Albiez in France last year, Afghan girls won silver and bronze. They used the chance to seek asylum and not come back.

Sadly, 30 years of reporting in Afghanistan has taught me there are no feelgood stories. Sadiqi was ousted from the federation by the boys’ team amid allegations he was running a visa racket and using the girls as his harem. He denies the accusations. “He is operating illegally,” said Galpin. “He refused to accept the results. He still has all the contacts and the women are beholden to him, it’s like Stockholm syndrome.”

Yet it’s hard to see Maryam and Nasrine cycle off and not feel cheered. “Without cycling I feel we Afghan women exist like a corpse,” says Maryam. “And we want to live!” 

The life-changing coding class

The Girls Can Code class in Kabul doesn’t seem promising to start with. The project has only 40 students across two schools, and on the day I visit, the teenage girls in jeans and bright headscarves are staring at blank screens. There has been a power cut and the man who has the key to the generator cannot be found. We all look at each other and the Steve Jobs quotes painted on the wall.

Then the girls swing into action — one of them has realised there is power in a building next door. Cables are dangled out of the window and the computers start to whirr.

Soon I am being shown the websites they have designed — one for a bakery, another to order pizza, a third to showcase tourist spots, in case the war ever ends.

“We always thought computing was for boys,” says Sophia Faizi, 16, who is wearing a red scarf and Union Jack sneakers in my honour. “Girls were supposed to be housewives or teachers. But girls can code! Now I want to be a computer scientist.”

“The biggest challenge for Afghan women is their families disapproving of them working outside, particularly in a mixed office,” says Zarmina Malalai, 45, from the Womanity Foundation, which runs the project. “But it’s also the worsening security. As the troops go, women are left unprotected. Learning to code means they can work from home.”

Over the next year, they are hoping to expand to eight classes in four schools. The classes run from 6am to 8am every morning, so the girls have to get up early, but they don’t seem to mind.

“This class is a big experience in my life,” says Zuhra Akbari, 19, who has designed a website for the school. “The biggest problem in our country is we can’t work with men and they think women are nothing. Sometimes me and my friends say, ‘Why were we born in Afghanistan not USA?’ ”

She wants to study law, but her family refuses to let her. “They say no, because you can’t be a good woman if you’re a lawyer. That really hurts me.”

Before I leave I ask if any of them wear burqas. They all laugh in horror. “Hamdullah, no!” one of them says — “Thank God.”

Kabul’s first women’s restaurant

I have known Mary Akrami since she started one of the first women’s shelters in Kabul in 2002. She now operates three in different provinces.

“There have been improvements, such as four female ministers in the government and many girls graduating from university,” she says. “But the violence I see on a daily basis — girls as young as 12 fleeing abusive marriages — is worsening.”

Cuts in international funding have forced her to close one of the shelters. “The support of the international community impacts all Afghans, but especially women. When that reduces, women are hardest hit,” she says. “So we have to help ourselves.”

She teaches the girls in her shelter to cook and has set up a catering service as a way for them to earn a living. It has proved so successful that at the end of last year she opened Kabul’s first women-run restaurant, employing 20 girls from the 57 in her shelter.

The sign outside reads “Family restaurant”, and guards only allow families or women inside. “The idea is it’s a safe place for women to work and also a safe place for women to come on their own.”

It has not been easy. Aid agencies refused to support a for-profit restaurant. So her husband and a colleague invested. Takings just about cover expenses, but not the rent.

One man with his family can’t stop staring as waitresses scurry about, a novelty in Afghanistan, where waiting staff are all male.

“It’s made a huge difference to these women,” Akrami says. “They are so proud they have a job to go to, and, for the first time in their lives, bank accounts.”