BUDAPEST, Hungary — Gyula Horn, a former Hungarian prime minister who played a key role in opening the Iron Curtain, has died at the age of 80.

He was best known internationally for his announcement as foreign minister in 1989 that Hungary would allow East German refugees to leave the country for West Germany, one of the key events that helped bring an end to communism in Eastern Europe.

Horn's death on Wednesday was announced by the Hungarian government and confirmed by the Socialist Party, which he led to victory in the 1994 elections. He had been hospitalized at a military hospital in Budapest for several years, receiving treatment for undisclosed ailments.

Tens of thousands of East Germans had traveled to Hungary in the spring and summer of 1989 as expectations mounted that the more moderate Communist country might open its borders to the West.

About 600 East Germans took advantage of a picnic organized by Hungarian pro-democracy activists on the border with Austria on Aug. 19 to over to the Western neighbor. In the weeks after the picnic, East Germans continued to make attempts to cross, although many were still turned back. Then, on Sept. 11, it fell on Horn to make public the government's decision to allow all East Germans to travel West.

The exodus was followed a few months later by the fall of the Berlin Wall and the start of the reunification of the two parts of the country.

The decision to let the East Germans leave was not without risks for Hungary, where 80,000 Soviet troops were still stationed and democratic elections would not be held until March 1990.

While Miklos Nemeth, Hungary's last communist prime minister, and other officials also deserve credit for the decision, Horn largely built his reputation in Western Europe, especially in Germany, on the announcement.

An iconic photograph from June 1989 showing Horn and Austrian Foreign Minister Alois Mock cutting through the wires of the fence separating the two countries enhanced Horn's image as a man who helped bring down the Iron Curtain.

Horn's "courageous work as Hungarian foreign minister will remain unforgettable to us Germans," German Foreign Minister Guido Westerwelle said Wednesday.

"Gyula Horn literally cut open the Iron Curtain that had divided Europe for 40 years," Westerwelle said. "We are taking leave of a great European who did the right thing at a decisive moment in European history."

At home, however, he faced bitter criticism, especially because of his stint of several months in an armed communist militia — the "pufajkasok" — after Hungary's anti-Soviet Revolution of 1956.

Horn claimed he never fired his weapon as a member of the militia and once famously answered "So what" to a question in Parliament about his role after the defeated uprising.

In May 1990, Horn became president of the Socialist Party, which he had helped shape out of the ruins of the former communist party. The party had just been soundly defeated in the first democratic elections in over four decades, but they managed to win a majority in the 1994 elections and on July 15 Horn became prime minister.

He was in office until 1998 and was followed by Viktor Orban, Hungary's current prime minister.

Although Horn remained a parliamentary deputy until 2010, he did not attend any legislative sessions after 2007 because of his deteriorating physical and mental condition.

He made his last public speech on July 6, 2007, at a celebration of his 75th birthday at the Hungarian National Gallery, an event attended by former Soviet leader Mikhail Gorbachev.

While Horn received several international awards for his actions of 1989, his nominations by the Socialists to receive high state awards on his 70th and 75th birthdays were rejected by two Hungarian presidents because of his communist past.

Born July 5, 1932, Horn grew up in dire poverty in a working-class district of Budapest, the third of eight siblings.

"I was born into the darkest poverty, constantly in want, even getting enough food was an unending problem," Horn wrote in his 1991 autobiography.

His father was killed in 1944 and a brother in 1956, both because of their communist affiliations.

Horn wrote of being a bread-winner by the time he was 11, pitching in after his family was evicted in the middle of winter because his mother could not come up with the rent.

In 1950, as a member of the Communist Youth, he was picked to study in the Soviet Union and spent the next four years studying accounting in Rostov, Russia, on a scholarship.

Upon his return from Russia he started work at the finance ministry, a job that involved travel in the country and "everywhere I went I saw big problems, tension, although there were areas where things were not that bad," he wrote.

Horn got married in 1956 to Anna Kiraly and he left finance for foreign affairs in 1959. He was assigned as an attache to Sofia in 1961 and later to Belgrade.

For the next sixteen years Horn worked in the foreign affairs section of the communist party's central committee. In April 1985, he became deputy foreign minister, and on May 11, 1989, foreign minister.

He is survived by his wife and two children, Anna and Gyula Jr.