Maryam Touzani never forgot the day a young woman knocked on the door of her home in Tangier asking for work.
"She was from a village and she was heavily pregnant. My mother had no work for her but was afraid to let her go... she wasn't in a good way and had clearly nowhere to go," the Moroccan actress and director said.
Sex outside marriage is illegal in the Muslim-majority country, and at the time a single mother who tried to give birth in a hospital would be thrown in jail.
"The girl had been going door-to-door, so my mother took her in for a few days until we worked something out.
"But there was no solution -- she had been going from town to town after running away from her family, working as a cleaner and hairdresser until people noticed her predicament and then she would have to move on.
"So she stayed with us until she had the baby," said Touzani, whose powerful new film "Adam", at the Cannes film festival, was inspired by the woman's heartbreaking dilemma over what to do with the child.
"She wanted to give up her baby straight away to give him a chance of a decent life, and to restart her own and become a respectable woman again," Touzani told AFP.
But when the baby arrived, things weren't so simple.
'Give the baby up'
"Because she gave birth over a bank holiday weekend, she had to keep the baby until the adoption office opened. I was with her as she tried to suppress the maternal extinct, to put distance between herself and the child. It was painful to watch and really shook me.
"Little by little I saw her resistance break" and the pain grow as the bank holiday drew to an end. "I went with her to give the baby up," Touzani said.
The hell that woman went through came home to when she became pregnant herself shooting "Razzia", a huge hit in the kingdom in 2017, which she wrote and starred in.
"When I felt the baby move inside me I began thinking of her and I understood. And straight away I started to write, it poured out of me..."
Already talked of as an Oscars foreign-language contender, "Adam" shines a light on a hidden woman's world in the conservative North African country.
Critics at Cannes hailed how the first-time director turned this "deceptively simple story... into gold" with the Hollywood Reporter praising its "great delicacy... made heartrending by the superb performances of Lubna Azabal and Nisrin Erradi."
In the film, a village girl who flees to Casablanca played by Erradi is reluctantly taken in by a widowed baker (Azabal) hiding her own grief.
- Children sold and abandoned -
While Touzani does not go there in her touching, intimate tale, unmarried mothers are complete pariahs in Morocco, she said, often regarded as prostitutes.
"It is the worst thing that can happen to a woman," she told AFP.
Until 2004 their children's birth could not even be registered, meaning they have no legal status. "They simply didn't exist," she said.
The shame is so intense that "children are often sold or abandoned", adding to the country's army of street children.
"There are so many terrible stories," Touzani said.
The writer-director has not shied from touching on raw nerves in her homeland.
Her husband Nabil Ayouch's banned feature "Much Loved" was based on a documentary of the same name she made about prostitution.
It was branded "an affront to moral values and Moroccan women" shortly after its premiere at Cannes, with actress Loubna Abidar forced to flee to France after being attacked in the street in Casablanca.
"Razzia", in which Touzani played the lead, also touched on taboos.
But she is convinced many who condemned the films in public were secretly pleased they had brought issues out into the open that Morocco needs to deal with.
"There is a facade that everything is all right on the outside even if people are tormented inside. It is good to let in some air and light, and people are relieved and happy things are being spoken about."
"I am not at all afraid for 'Adam'. In any case, nothing comes from fear."