“Fine, fine, you are right,” he replied, unruffled.

Local officials, on the other hand, are showering him with visits and gifts: a case of canned soft drinks, new metal-rimmed eyeglasses, an electricity hook-up to his house and about $300 in compensation for his seven years of confinement and torture.

“If the hospital’s doctors had not diagnosed him as mentally ill, this whole situation would not have happened,” said Zhang Weili, the district government’s vice director of propaganda. “I don’t want you to think this is a government that intentionally harms its citizens.”

After Mr. Xu’s case came to light, he said, officials swept the county’s records for similar instances and found none. Somehow, however, they missed Mrs. Zhang, the handicapped 65-year-old neighbor whose land dispute landed him in confinement to begin with.

Mrs. Zhang said she was forced into a different mental hospital and released a year later only after her daughter hired a lawyer. She not only never won back her small strip of land, she said, but was forced to abandon her village home for a squalid tenement to avoid harassment by her neighbors.

“I have always known that I would never win against the government,” she said. “But I am just so angry I can’t get over it. If this is the last thing I do, I will keep fighting them.”

Mr. Xu’s brother initially opposed his brother’s efforts to help Mrs. Zhang, arguing it was not his family’s business. Now he is also infuriated. “I just cannot swallow this injustice,” he said. “The government wants to protect its power. It is not here to protect its citizens.”

Still, he said, “Eventually the truth comes out.”