Writing every day in his prison cell saved his sanity, Hiber Conteris remembers. As a prisoner of conscience for more than eight years in Uruguayan jails, Conteris, a journalist, professor of literature, former Methodist pastor and father of three children, was beaten and tortured following his arrest by the military government's security police in December 1976.

The imprisonment of Conteris lasted eight years and four months, until March of this year, when he was released in a general amnesty granted by Uruguay's new civilian government. Last week, Conteris visited Washington as a free man.

Conteris came to thank personally the coalition of protest -- 26 senators, 83 House members, human-rights advocates and such groups as the Committee to Protect Journalists -- that kept up the pressure against his unjust imprisonment.

The heroic survival of Conteris is the story of two forces: the moral force used by Conteris, a student of Gandhi, to convince his jailers that his spirit could not be broken, and the political force marshaled by his relatives to keep his imprisonment from being forgotten.

These are days -- years, really -- when human-rights victories are rare. Amnesty International, which adopted Conteris as a prisoner of conscience, documented in 1984 governmental torture in 98 countries. In many of them, torture is "a tool of state policy."

It was that way in Uruguay in 1976, when Conteris returned to Montevideo from a peace conference in Europe. Security police jammed a hood over his head and took him from the airport to intelligence headquarters. Under the Law of State Security and Internal Order, he was charged with such crimes as "illegal association" and "assault upon the Constitution." A military court sentenced him to 15 years' imprisonment.

Conteris had been marked by the government because in the 1960s he had been aligned with Uruguay's Movement of National Liberation. The group began as a nonviolent resistance force against the military dictatorship and had wide public support. When it turned to armed guerrilla tactics, Conteris was one of many who left. That was in June 1970. Six years later, in retroactive harassment, the military took him away.

Conteris is still thin from his imprisonment, but all else -- his warm humor, scholarly mind and sheer gratefulness for merely being alive -- are incarnations of the hope he never let die.

One of the unique cruelties of prison life was the mental torture. Conteris recalls that psychologists were employed to discover ways of breaking the minds of the inmates. Conteris, one of 6,000 political prisoners during those years, defended himself mentally by writing. After a time, he was allowed paper and pen and would write eight hours a day. On release in March, he had produced four novels, a collection of short stories and two plays. He is soon to meet with American publishers to get them into print.

The American most familiar with the heroism of Conteris is his nephew, Andres Thomas. Thomas' mother, Ilda, is the sister of Conteris and lives in Madison, Wis. In 1979 Thomas accompanied his mother to Uruguay, where they were allowed to see Conteris. The experience came near to shattering Thomas, who was then a junior in high school. He decided to commit himself full-time to working for his uncle's release.

In the next six years, he visited the offices of more than 200 senators and congressmen, wrote hundreds of letters to diplomats and journalists and organize an international campaign on behalf of Conteris.

Thomas, who graduated last year from Earlham College in Indiana with a degree in peace studies, recalls that nearly everyone he spoke with in Congress was helpful. Those who were unhelpful included Elliott Abrams, the Reagan administration's official for human rights for four years. Abrams' style of "quiet diplomacy," Thomas says, "is not always effective in a country that borders on fascism."

In time, the full story of Conteris will be told in his books. The prison literature of the 20th century is about to receive a stunning addition.