When director Rokhsareh Ghaem Maghami started shooting her documentary on forced marriages, she never could have imagined that it would one day be called "uplifting," "optimistic," "the most modern of fairytales."

She met Sonita Alizadeh through her cousin, a social worker in an NGO protecting street children. Sonita was just another undocumented teen refugee from Afghanistan, searching for shelter in Iran.

Sonita was not like other kids. Inspired by Eminem, Rihanna and most importantly, Iranian rapper Yas, she wrote her own lyrics and dreamed of becoming a rapper too.

"I saw her passion, but I couldn't see much future for her. I wanted to film her to show the situation of young refugees. I couldn't imagine that this was going to be a happy-ending film," the director told DW.

And yet it did.

Now Sonita is 19, she lives in Utah, in the US, where she got a scholarship and goes to a proper school for the first time in her life.

Her song "Brides for Sale" has more than half a million views on YouTube. This spring, she performed it live at the Women in the World summit in New York.

Sonita escaped her fate as a child bride. This wouldn't have happened without Maghami's film.

Not all of Sonita's friends escaped forced marriage

How much does a 16-year-old bride cost?

When she turned 16, Sonita's family decided to sell her into marriage. In Afghanistan, it's a tradition driven by poverty, patriarchy and poor education. She was valued at $9,000 (8,200 euros). Her family needed the money to allow Sonita's brother to buy a wife of his own.

Some of Sonita's friends in the NGO were already sold. "His name is Mohammad. He's about 18," says one of the girls in the documentary. "That's nice! They're almost the same age!," cheers another friend who wasn't as lucky: her future husband is a 30-year-old man, with kids and another wife. "Did you agree or did they beat you?" her friend asks. "At first they beat me up. Then I agreed."

The film's turning point comes when Sonita asks: "Would you buy me? I am for sale anyway," looking straight into Maghami's camera. And filmmaker does, paying 2,000$ to free Sonita for six more months.

Iranian filmmaker Rokhsareh Ghaem Maghami

"I decided to do it. If I'd let someone lose her life because of 2,000 dollars, I would have felt bad for the rest of my life," explains Maghami.

By doing this, she was breaking the unwritten rule of documentary filmmaking - not to interfere in the process of the story that you are documenting. But that did not worry Maghami.

"I think these rules are not really valid," argues the director. "The only rule is to be as transparent as possible. Documentarists claim to be objective but they always are subjective. It is said that the only objective documentary is the one from surveillance cameras of banks. If you want objectivity, go watch that movie."

The music video that saved Sonita

At the time, Sonita had already recorded her song "Brides for Sale." After several failed attempts, she finally found a studio in Iran to do it. She then wanted a music video to accompany the song. Maghami and Sonita waited for her family to be away from home to film it.

An image from Sonita's music video "Brides for Sale"

"I scream to make up for a woman's lifetime silence. I scream on behalf of the deep wounds on my body. I am perplexed by this tradition and these people. They sell girls for money. No right to choose," raps Sonita with a price tag painted on her forehead and bruises on her face.

She sings in Persian, and the English subtitles of her lyrics make her heartfelt message clear for the whole world to understand: she wants forced marriages to stop.

The video went viral on YouTube. After few weeks, the rapper was contacted by an American NGO called Strongheart. With their help she received the scholarship that would send her to Wasatch Academy, a preparatory boarding school in Utah, 7,000 miles away from Afghanistan.

Giving a voice to thousands of young women

Maghami followed Sonita until the happy end of her journey. But the filmmaker's struggle wasn't over yet. She needed help to get the film released.

She was finally supported by the German production company TAG/TRAUM and the Swiss producer Aline Schmid from Intermezzo Films. They obtained funds to distribute "Sonita" properly.

"If we do not talk and act about child marriage, we fail on a global scale. Films like 'Sonita' help make us aware of this issue, through the wonderful, charismatic protagonist Sonita. Her fate is not a single case but one of thousands of cases," says TAG/TRAUM producer Kerstin Krieg.

Sonita was named of the Top 10 Badass Young Feminists

"Sonita" had its world premiere at the International Documentary Film Festival in Amsterdam in November 2015. The film was this year's Sundance festival hit, winning both Grand Jury and Audience awards in a World Cinema Documentary category. "The Guardian" included it among the contenders most likely to get an Oscar nomination for Best Documentary.

Sonita became a media sensation included in BBC's 100 Women of 2015 and Foreign Policy's Global Thinkers of 2015 lists. "Teen Vogue" named her one of the "10 Badass Young Feminists." This September, "Girls Not Brides," a global partnership of more than 600 civil society organizations committed to ending child marriage named Sonita their representative.

Education is key

Sonita won the fight for her own freedom but she didn't forget her family in Iran, including her younger sisters. "I have great friends here (in the US) and I love them but sometimes I miss my family, my friends and my homeland so much," she said after the German premiere of the documentary this May. "At first it was hard, but now my relation with my family is excellent. They are my fans."

The rapper and activist wants to dedicate her life to end child marriage not only in Afghanistan but all over the world.

The scale of the problem is huge: One out of three girls in the developing world gets married before turning 18 and one out of nine gets married before the age of 15, according to International Center for Research on Women.

Sonita is now an activist, shown here speaking at the Clinton Global Initiative in NY in 2016

"We can end child marriage. We need educational programs for families and communities and even regional leaders, so that parents know there are other possibilities for their daughters. We also need laws to make child marriage illegal," Sonita says.

Sonita is proof that education works. "I have my theory on why she grew up rebellious, when other girls didn't," says Maghami, who has known Sonita for four years already. "She was separated from her family and kind of adopted by the women in the Iranian NGO. She could see that the women there were educated, they had jobs. Some of them were married, some were not. None of them were sold or forced to marry. She saw that another way of life is possible. In the organization she got classes about life skills, for example, how to negotiate. She learned how to say no."

"Sonita" will be screened at the Viennale film festival in Vienna, Austria, at the Filmplus festival in Cologne, Germany, and Inconvenient Films festival in Vilnius, Lithuania. The official DVD will be released in March 2017.