Associated Press writer
WARSAW, Poland (AP) -- For Tadeusz Mazowiecki, his transformation from a pro-democracy writer and an intellectual to a moving force in Poland began in 1980, when he joined ranks with the striking workers at the Gdansk shipyard who founded the Solidarity movement.
Nine years later, he became the nation's first post-communist prime minister.
In both cases, he played an important role in Eastern Europe's historic democratic transformation.
Mazowiecki died on Monday at a hospital in Warsaw, where he had been taken several days earlier with a high fever, his personal secretary, Michal Prochwicz, told The Associated Press. He was 86.
Many called Mazowiecki's death a great loss.
Fighting back tears, President Bronislaw Komorowski said the Poles should think with gratitude about everything that has happened in Poland since 1989, when Mazowiecki took office.
National flags were flown at half-staff on government and administration buildings across Poland.
Lech Walesa, the former electrician who led the Solidarity movement, said it was a "pity that such great people are dying. We could have used his wisdom today, when democracy is not so perfect."
Prime Minister Donald Tusk said Mazowiecki was "an outstanding figure of Poland's politics of the 20th century" and that the Poles "remember his unusual calm, inner strength, very kind face and wise eyes. They gave us all courage."
In its message of condolences, the U.S. State Department said " the world has lost a true statesman; his legacy transformed Poland into a vanguard of democratic and free-market values."
A state funeral will be held Nov. 3 in Warsaw's Arch-Cathedral of St. John. Mazowiecki will be buried in the family grave in Laski, near Warsaw.
A lawyer by training, a writer and thinker by temperament, Mazowiecki was well equipped for his role in ousting communism from Poland and shaping a democracy.
As prime minister, he called for drawing a "thick line" to separate the communist past from new Poland, a variously interpreted and much-criticized comment that contributed to his ouster after more than a year in office.
The crucial 1980 Gdansk shipyard strike was held to demand restitution of a job for a fired worker, Anna Walentynowicz, better pay and a monument to workers killed during a 1970 protest.
The action rapidly grew into a massive wave of strikes that gave birth to Solidarity, Eastern Europe's first free-trade union and a nationwide freedom movement, led by Walesa, whose name quickly became known around the globe.
Walesa later said that "everybody was very glad" that Mazowiecki and other intellectuals joined workers, because it was a sign of united resistance.
Until well into Poland's democracy in the 1990s, Mazowiecki was among Walesa's closest counselors, advising him in the tough yet successful negotiations with the communists, who granted union and civic freedoms in 1980.
Like Walesa, and many Solidarity activists, he was detained under martial law, imposed on Dec. 13, 1981, to curb the freedom that had irritated Moscow.
After one year in confinement, Mazowiecki returned to Walesa's side and wrote reports about social and economic stagnation under martial law.
The hardships inspired a new wave of strikes in 1988. Mazowiecki walked arm in arm with Walesa at the head of angry workers in Gdansk. The renewed protests brought the communists to the negotiating table with Solidarity, to discuss the terms of democratization. Mazowiecki authored many of these terms.
The outcome was Eastern Europe's first partly free parliamentary election on June 4, 1989 that gave Solidarity seats in parliament and --hard to believe at the time -- paved the way for the first democratic government in the cracking communist bloc.
In September, Mazowiecki became the region's first democratic prime minister. His V-for-victory sign to the chamber on appointment became the symbol of Poland's triumph over communism. Poland's peaceful revolution initiated changes in the region -- climaxing in the fall of the Berlin Wall in November 1989.
On Monday, Poland's and foreign public figures praised Mazowiecki's achievements.
Poland's last communist leader, Gen. Wojciech Jaruzelski, who was president when Mazowiecki was prime minister in 1989-90, said he "appreciated Premier Mazowiecki's wisdom, moderation and presence of mind in assessing difficult situations, and his stubborn insistence on things that he considered to be key."
"He was prime minister at a very difficult time," Jaruzelski said. "It required a lot of wisdom and tact to lead Poland through the great reforms."
German Chancellor Angela Merkel, who grew up in communist East Germany, said that Mazowiecki made "an unforgotten contribution to overcoming authoritarian injustice and to the unity of Europe."