Vaclav Havel, a Czech writer who was imprisoned by his country’s former communist rulers, only to become a symbol of freedom and his nation’s first president in the post-communist era, died Sunday at his weekend home in the northern Czech Republic. He was 75.

The death was announced by his assistant, Sabina Tancevova, The Associated Press reported. Havel, a former smoker, underwent surgery for lung cancer in 1996 and had suffered from lung ailments in recent months.

Havel was a playwright by profession and a political activist by avocation. The two activities were complementary, and each served to gain him a leading place among the dissidents of Eastern Europe who helped bring down the communist empire. His words and deeds resonated far beyond the borders of the former Czechoslovakia, and he was widely recognized for his struggles in behalf of democracy and human dignity.

LEARNED ‘NOT TO CARE’

After being unanimously elected president of Czechoslovakia by the newly free country’s parliament in December 1989, Havel set the tone of the new era in a speech Jan. 1, 1990, his first day in office. Communism, he said, was “a monstrous, ramshackle, stinking machine” whose worst legacy was not economic failure but a “spoiled moral environment.”

“We have become morally ill because we are used to saying one thing and thinking another,” he said. “We have learned not to believe in anything, not to care about each other.”

In July 1992, he resigned the presidency when it became clear the country would be divided, with the Czech Republic and Slovakia going their separate ways.

The split became formal Jan. 1, 1993. About three weeks later, the new Czech parliament called on the country’s most famous citizen to return to the presidency. He remained in office for another 10 years.

Although his office was largely ceremonial, Havel had wide-ranging influence. He was credited with a major role in providing political stability as the country’s economy made a relatively trouble-free transition from communist central planning to a free market. In foreign affairs, he was influential in gaining his country’s admission to NATO.

FIRST KNOWN FOR DEFIANCE

But it was as a dissident that Havel first gained the world’s attention. For more than two decades, starting in the 1950s, his books and plays were banned in Czechoslovakia. They nonetheless reached a large audience via underground publishing and BBC and Voice of America broadcasts.

The regime’s repeated denunciations also contributed to Havel’s fame and influence. In 1977, he became the most visible member of Charter 77, a Czech movement that protested the communist regime’s human rights violations.

The price he paid was repeated incarceration. He was imprisoned from 1979 until February 1983, when he was released for health reasons. Just before assuming the presidency, he was held again for four months, for taking part in a prohibited demonstration marking the anniversary of the death of Jan Palach, who set himself on fire to protest the Soviet invasion of 1968.

Although he claimed to be reluctant to pursue a political career, in November 1989, Havel helped found the Civic Forum, the first legal political opposition to exist in Czechoslovakia since the communists took power in 1948. With its Slovak counterpart, Public Against Violence, the Forum staged large-scale demonstrations and entered negotiations with the government.

From the beginning, Havel made it plain that his would be a new kind of government.

Among his first actions was the appointment of U.S. rock musician Frank Zappa to be a “special ambassador to the West” on trade and tourism, prompting an incensed U.S. Secretary of State James Baker to say, “You do business with the United States, or you can do business with Frank Zappa.” Havel had been an admirer of Zappa and his band, the Mothers of Invention, since the 1960s.

POPULARITY WANED

Havel’s most difficult problem was the economy, and it was an important factor in the breakup of Czechoslovakia in 1992. As Prague began moving toward a market system, conservatives called Havel a “crypto-socialist” because he insisted the government still had a planning role. Left-wingers claimed he was pushing privatization of industry too fast.

Havel also was criticized for his opposition to a law that deprived former communist officials of their civil rights.

Although most Czechs could scarcely imagine anyone else in the presidency, Havel’s popularity eroded over the years. When the parliament elected him to a second five-year term in January 1998, it was by a single vote.

He was criticized for his marriage in 1997 to Dagmar Veskrnova, an actress 17 years his junior, who survives him. They were married less than a year after Havel’s first wife, Olga Splichalova Havlova, died of cancer.