Fedia Hamdi, the Tunisian market inspector accused of hitting Mohamed Bouazizi, celebrates after being released from prison last Wednesday. Photograph: Andy Hall/AFP

It was the slap that started a revolution. When the Tunisian street trader Mohamed Bouazizi, 26, was slapped in the face by a female municipal inspector last December, he burned himself alive in protest and sparked a wave of anti-government riots that engulfed the Arab world.

True or false? The woman at the centre of the controversy has now denied hitting Bouazizi and claims she was wrongly imprisoned for four months. Fedia Hamdi, 46, who has not spoken publicly about the incident until now, told the Observer that she had been used as a political pawn by the former Tunisian president, Zine al-Abidine Ben Ali. "I feel I was a scapegoat," she said. "I feel there has been a grave injustice and it hurts me to think that no one wanted to listen to my story."

After 111 days of incarceration, Hamdi was freed by a tribunal in her hometown of Sidi Bouzid last Tuesday after defence lawyers demolished the case against her. Hamdi was found innocent of all charges when it emerged in court that only a single person claimed to have seen the slap – a fellow street trader who bore a grudge against her – while four new witnesses testified that there had been no physical confrontation.

"I would never have hit him [Bouazizi]," Hamdi said, speaking from her parents' home in Meknassy, approximately 50km from Sidi Bouzid where the alleged incident took place. "It was impossible because I am a woman, first of all, and I live in a traditionally Arab community which bans a woman from hitting a man. And, secondly, I was frightened … I was only doing my job."

The tale of Bouazizi's self-immolation rapidly became the stuff of legend in the early days of the jasmine revolution. It was reported in media outlets across the globe that Bouazizi, a fruit and vegetable seller, had set up his stall as usual on the morning of 17 December in the central Tunisian town of Sidi Bouzid.

At about 11.30am Hamdi, accompanied by another municipal official, approached the market trader to insist that the regulations did not allow him to sell his wares without a permit. It was reported at the time that Hamdi confiscated Bouazizi's electronic scales and his cart when he refused to pay a bribe. When he became agitated, it was alleged that she slapped him across the face. Hamdi, who is unmarried and has no children, denies this.

What is indisputable is that when Bouazizi tried to retrieve his cart from the police station, he was turned away. He then asked to see the local governor, but was also refused entry. At about 1pm he set himself alight. He later died of his injuries in hospital.

Within hours of Bouazizi burning himself alive, a crowd of 4,000 people had gathered in Sidi Bouzid to protest against his public humiliation. For many, Bouazizi's death became a potent symbol of an ordinary individual who struggled to make a living under President Ben Ali's corrupt regime. It was the spark that ignited a series of revolutions across the Arab world – most notably in Egypt, Yemen and Libya.

But for Hamdi, the reality was rather different. "I was just doing my job," she says now, sitting in a large front room surrounded by her seven siblings and elderly parents. "The only thing I was trying to do that day was to apply the law and the law doesn't allow market traders to go in a public zone. When I asked him to leave, he refused and he grabbed hold of my hand, hurting my finger. He was angry with me, so I let it go, but as a penalty I confiscated some of his bananas and peppers and gave them to a charitable association… Afterwards, I went back to my work and then I went home at 1pm and I didn't do anything else."

According to Hamdi, Bouazizi was "hysterical" when she left him. "He was almost unaware of what he was doing." One resident of Sidi Bouzid, speaking on condition of anonymity, claimed that Bouazizi poured petrol on himself "as a threat. He didn't mean to kill himself". Several of Hamdi's colleagues, some of whom set up a Facebook group to campaign for her release, suggest Bouazizi set himself on fire by accident while lighting a cigarette.

Whatever the truth of the incident, in the days after Bouazizi's self-immolation, the atmosphere in Sidi Bouzid was extremely unstable. President Ben Ali, wishing to avert any further protest, ordered Hamdi's detention on 28 December. She was kept under house arrest for three days before being taken to a civil prison in the town of Gafsa, 50km away. Hamdi was put in a group cell with other prisoners.

As the revolution raged beyond her cell door and Ben Ali fled to Saudi Arabia to the jubilation of the Tunisian people, Hamdi refused to reveal her identity for a month for fear of reprisal.

"I was so scared," says Hamdi, tears falling down her cheeks. "And it made me sick to my heart that everyone refused to listen … I felt I was facing so much injustice."

Who does she blame? "The media – for me, that is the root of the problem. Not so much the Tunisian media, because they came under pressure from the government, but the reaction of the international media shocked me because they have a reputation for honesty." Does she feel anger towards the former president for his actions? "Of course," she says. "Like the rest of the Tunisian people."

In prison, Hamdi went on hunger strike for 15 days until doctors intervened. She remains traumatised by her experience, her hands tremble and she walks with a stoop. She has not been able to sleep since her release and finds eating difficult.

"It's true that I have suffered," she says. "But my family and my colleagues suffered much more because they were rejected by the community. They tried to tell their story but no one would listen … In prison, I missed my family so much. When I saw them again after I was freed, I felt newborn. I feel so thankful."

In spite of all that she has been through, Hamdi insists she welcomes the deposition of the former president and her part in his downfall. "I am happy about the revolution," she says. "I am a religious woman. All that happened was so hard, but it was my destiny and I am proud of my destiny. It was given to me by God." As for the Bouazizi family, who continue to revere their son as a martyr: "I do not want to talk about this family any more. I want to move on."

Does she eventually want to return to work? "Yes, absolutely," she replies. "I'm convinced that justice is important. We should all believe in the law."

The full version of Elizabeth Day's dispatch from Tunisia will appear in the Observer magazine in a forthcoming issue.

Comments were erroneously switched on for this article and have now been closed