Villagers pack the court to applaud woman given two years in prison for trying to prevent land grabs and illegal demolition

She had everything you might want in an official: brains, diligence and an air of authority. She wielded the seals of office with both confidence and compassion. Unfortunately, Zhang Haixin lacked the government job to match these attributes.

On Friday a court in the province of Henan, in central China, jailed the 46-year-old farmer for two years for fabricating seals and forging official documents. Her friends Ma Xianglan and Wang Liangshuang were sentenced to 10 and eight months respectively.

In a country that has seen fake monks, fake police academies and fake UN peacekeepers, initial reports of Zhang's "fake government" raised the spectre of another money-making venture.

Yet villagers packed the court for her trial and burst into applause when defence lawyers spoke. They see her not as a criminal but a champion – a rare, bold voice for farmers' rights in a country where many of the rural poor feel left behind – even assailed – by China's rapid development.

Zhang's audacious last act, issuing impressive-looking documents and notices, warded off forced land acquisitions and demolitions. "I'm innocent. I'm not corrupt; I didn't make money. I did this to serve the people," she said at her trial in May.

Land grabs are one of the biggest sources of unrest in China, and Landesa, an international land rights organisation, says 4 million rural inhabitants lose plots to the government each year.

Local authorities have few sources of income and rely on land sales to pay for employees and services. But villagers – who cannot sell the land themselves, because it is owned collectively – receive meagre compensation or even none at all when governments seize it and sell it to developers. Those who resist often face forced eviction by hired thugs. Last autumn's Third Plenum, an important policy-setting party summit, promised farmers more property rights. But experts are cautious about the prospects for meaningful reform.

And in the meantime, with scant means of redress, many of those affected seize on any prospect of help, however vague.

Zhang Haixin

Henan villagers were hazy about Zhang's exact powers; one acolyte is said to have explained that her identity had to be protected, "like the Central Intelligence Agency in TV shows". Some were disappointed when they met her. This stocky woman, tanned from the fields, plain-speaking and cheaply dressed, was not their idea of an official. Yet her self-assurance and command of legal jargon quickly restored their confidence.

She showed particular kindness to women and the elderly, who are more used to being brushed aside. She was resolute.

"With an education, she could have been an Aung San Suu Kyi," one of her lawyers, Gao Chengcai, said.

Zhang initially took on officials for refusing to pay the 5,000 yuan (£480) bill they had run up at her small restaurant; they said it would offset her unpaid fines for breaching birth-control policies by having three children.

Her attempt to sue them failed, but word of her boldness soon spread in her village, Jiangzhuang. When officials there announced that they had given a piece of land away in compensation for a debt, the affected farmers turned to her.

Zhang took their complaints to successive levels of government over four years. On her many trips to Beijing she travelled "more than the distance between the earth and moon", she wrote in her testimony.

She filed endless complaints with everyone from the petitions bureau and agriculture ministry to the party's discipline inspection commission. Work and family life fell by the wayside.

She had no more than primary education, but now pored over books on rural law. The household savings were eaten away by expenses. Her personal grievances were submerged in the broader tide of discontent.

Her eldest son, Wu Yang, would find her working at 3 o'clock in the morning: "I would see her light on and she would be up writing letters for people," he said.

Wu said his mother was a good woman, but is unsure why she became so compelled by her mission. "She liked to get involved in people's lives," he added, with a hint of a smile. Eventually Zhang acted on advice that she and others could form a cooperative, farming independently of the village committee, by pooling their land-use rights. But authorities would not give the new body the red seals or stamps of approval that it needed. Company and government seals are carefully controlled in China because of the legal status they convey on documents.

But whether through a misunderstanding or sheer exasperation, Zhang took an official seriously when he exclaimed: "Should I help you to make a seal?" as she peppered him with questions. She had one carved illicitly: "The Jiang Collective Economic Organisation of the People's Republic of China," it said.

Then she bought three more – for the Dengzhou Municipal People's Government, Gaoji township government and Dengzhou procuratorate.

The Jiang collective quickly issued a "notice of suspension" banning building work on the disputed land. The constellation of red seals dispelled any doubts about its authenticity.

A flurry of documents to halt similar projects followed. Zhang's "office" issued land certificates – which farmers are entitled to, but often lack – to help them to safeguard their rights. It even advertised for staff, the prosecution claimed, though supporters say all workers were voluntary.

Her work inspired Ma and Wang, whose villages faced similar disputes. But after a developer became suspicious about a notice from Ma's cooperative, police arrived at her home. They seized Zhang and Wang days later.

The trio refused to sign the judgment against them on Friday. Lawyer Liu Shuqing said Zhang saw the fake documents as "an emergency measure", after exhausting all legal avenues to protect villagers' rights.

Zhang had actually helped the government's image, he said: "A lot of people believed she had been sent from senior levels, and that officials cared about village people's lives."

But the judge in Dengzhou ruled that the illegality of demolitions had no bearing on the illegality of forging official documents.

"All we tried to do was fight for our land. We didn't even steal one penny from the street," said one of Zhang's supporters, who asked not to be named for fear of retaliation by local officials. "Of course we think we have rights. But we spent money and a lot of energy petitioning and travelling. Now the money is gone, people are tired and Zhang Haixin's in prison. The crops have been destroyed and developers have started building."

Additional research by Cecily Huang