The last witch beheaded in Europe should be exonerated because she was a victim of "judicial murder" more than 200 years ago, said the government of the Swiss canton (state) of Glarus on Tuesday.

The 1782 execution of Anna Goeldi for an alleged case of poisoning was a miscarriage of justice, the cantonal government said. The decision to recommend "rehabilitation" — or clearing her name — came after a long debate in the eastern Swiss region and was taken in consultation with the Protestant and Roman Catholic churches.

The decision reverses the refusal last year by the cantonal government and the Protestant Church council to consider an exoneration. The government changed its view after the cantonal parliament urged it to reconsider.

The recommendation to acknowledge that Goeldi was unfairly prosecuted and not a witch goes back to the parliament for final approval.

Goeldi, a maidservant in the house of prominent burgher Johann Jakob Tschudi, was convicted of "spoiling" the family's daughter, causing her to spit pins and have convulsions.

Tschudi, a doctor and magistrate, was alleged to have had a love affair with Goeldi. Should his adultery have been made public, his reputation would have been seriously damaged.

Goeldi's trial and beheading in the village of Mollis was carried out at a time when witch trials had disappeared from most places in Europe.

The Protestant Church council, which conducted the trial, had no legal authority and had decided in advance that the woman was guilty, the government said. She was executed even though the law at the time did not impose the death penalty for nonlethal poisoning, it added.

"This is to acknowledge that the verdict handed down came from a nonlegal trial and that Anna Goeldi was the victim of 'judicial murder," said a government statement.

Goeldi's torture and execution was even more incomprehensible as it happened in the Age of Enlightenment when "those who made the judgment regarded themselves as educated people," the government said.

"In spite of that they tortured an innocent person and had her executed, although it was known to them that the alleged crime was neither doable nor possible and that there was no legal basis for their verdict."

But it noted the exoneration should not give the impression that today's generation assumes the responsibility for the history of the ancient villagers.

The case was brought to light through a book by local journalist Walter Hauser, who highlighted the links among Tschudi, Goeldi and the village authorities.

The government said exoneration also can be an acknowledgment that an unknown number of other innocent people whose cases cannot be reviewed were killed over the centuries.

Several thousand people, mainly women, were executed for witchcraft between the 14th and 18th centuries in Switzerland, as they were elsewhere.

The Glarus government said it will contribute $118,000 to an upcoming theater play on Goeldi as "additional sign" to the rehabilitation.

A museum on Goeldi was opened in Mollis in September on the 225th anniversary of her death.

"Rehabilitation is to be more than simple confirmation of innocence," the statement said. "It has to set aside an incomprehensible, unjust state act and acknowledge a crass injustice and seriously false verdict."