BERLIN (AP) — Hans Modrow, who served as East Germany’s last communist leader during a turbulent tenure that ended in the country’s first and only free election, has died. He was 95.

Modrow died early Saturday, the Left party parliamentary group tweeted.

Modrow, a reform-minded communist, took over East Germany shortly after the Berlin Wall fell and later invited opposition forces into the government, but could not slow the gathering momentum for German reunification.

“The entire peaceful course of establishing German unity was precisely a special achievement of his,” the Left wrote on Twitter. “That will remain his political legacy.”

During 16 years as communist party chief in Dresden, starting in 1973, Modrow built a reputation as an anti-establishment figure. He rejected party perks and insisted on living in a normal apartment.

A post in East Germany’s top leadership eluded him until he was made prime minister, a position that previously carried little clout, in November 1989 — days after the fall of the Berlin Wall.

When hard-line leader Egon Krenz and his ruling Politburo resigned in early December, Modrow emerged as East Germany’s top political figure. But the communists could no longer call the shots on their own. The following month, he agreed to share power with the increasingly vocal opposition and moved up East Germany’s landmark first free election to March 1990, amid growing unrest.

Even as pro-democracy rallies rapidly took on a pro-unification flavor, the communists initially had opposed talk of reunification. In February 1990, however, Modrow urged talks with West Germany toward an eventual “united fatherland” that would be independent of military blocs and governed by a joint parliament in Berlin.

Modrow headed the election campaign of the restyled communists, the Party of Democratic Socialism, but his personal popularity was not enough to prevent them finishing as only the third-strongest party, with 16 percent support.

The winner was an alliance of conservative parties that favored quick reunification and was backed by the government of West German leader Helmut Kohl. Germany reunited under Kohl’s leadership and as a NATO member on Oct. 3, 1990, less than a year after the fall of the Berlin Wall.

Modrow became a member of the united parliament, where he sat until 1994, and honorary chairman of the post-communist PDS — the predecessor of today‘s opposition Left party. From 1999 to 2004, he was a member of the European Parliament.

Modrow’s past under hard-line communist rule landed him in court several years after reunification.

In 1995, a court convicted him of inciting the falsification of results in May 1989 local elections in Dresden. It handed him a nine-month suspended sentence and a fine.

Modrow claimed that the trial was politically motivated and asserted that its outcome would aggravate divisions between east and west Germans. His attorney argued that he had made amends for previous injustices by overseeing free elections as prime minister.

Later in life, Modrow served on the council of elders of the Left party.

“Hans was a deeply sincere and combative socialist,” tweeted Dietmar Bartsch, the chairman of the Left party parliamentary group. “Until old age he was an important adviser in our party, whose wisdom will be missed.”