Thousands of people including Polish and European leaders attended the state funeral of Tadeusz Mazowiecki, Eastern Europe's first post-communist prime minister.
A pro-democracy activist and writer, Mazowiecki served as an adviser to Lech Walesa, the leader of the Solidarity freedom movement, which ousted communists from Poland in 1989.
Mazowiecki, who died Monday at a Warsaw hospital aged 86, became the first post-communist premier that year through 1990.
Poland's transformation inspired the end of communism in the region, but the stringent economic reforms initiated under Mazowiecki led to his bitter defeat in the first popular presidential vote in 1990. He later served as UN envoy to war-torn Bosnia, but resigned in 1995 to protest what he perceived to be world inaction in the face of atrocities there.
European Commission President Jose Manuel Barroso also joined mourners for the funeral Mass at St. John's Arch Cathedral in Warsaw. Mazowiecki's simple wooden coffin, covered by Poland's white-and-red national flag, was placed in front of the altar that was decorated with yellow roses. Mazowiecki was a deep Catholic believer and, according to those who worked with him, followed moral principles in his political decisions.
"We bid farewell to ... the prime minister of the time of transition ... the architect and constructor of ... our independent and democratic state. We bid farewell to our prime minister," President Bronislaw Komorowski said during the funeral. "Tadeusz Mazowiecki did a good service to Poland."
People gathered in front of the Arch Cathedral clapped when the coffin was carried out after the Mass.
Messages of condolences came from President Barack Obama, German Chancellor Angela Merkel, Pope Francis and other leaders.
Mazowiecki was laid to rest in Laski, near Warsaw.