The Ministry for State Security (German: Ministerium für Staatssicherheit, MfS) or State Security Service (Staatssicherheitsdienst, SSD), commonly known as the Stasi was the official state security service of the German Democratic Republic (East Germany). It has been described as one of the most effective and repressive intelligence and secret police agencies ever to have existed. The Stasi was headquartered in East Berlin, with an extensive complex in Berlin-Lichtenberg and several smaller facilities throughout the city. The Stasi motto was Schild und Schwert der Partei (Shield and Sword of the Party), referring to the ruling Socialist Unity Party of Germany (Sozialistische Einheitspartei Deutschlands, SED) and also echoing a theme of the KGB, the Soviet counterpart and close partner, with respect to its own ruling party, the CPSU. Erich Mielke was the Stasi's longest-serving chief, in power for thirty-two of the GDR's forty years of existence.
One of its main tasks was spying on the population, mainly through a vast network of citizens turned informants, and fighting any opposition by overt and covert measures, including hidden psychological destruction of dissidents (Zersetzung, literally meaning decomposition). Its Main Directorate for Reconnaissance (Hauptverwaltung Aufklärung) was responsible for both espionage and for conducting covert operations in foreign countries. Under its long-time head Markus Wolf, this directorate gained a reputation as one of the most effective intelligence agencies of the Cold War. The Stasi also maintained contacts, and occasionally cooperated, with Western terrorists.
Numerous Stasi officials were prosecuted for their crimes after 1990. After German reunification, the surveillance files that the Stasi had maintained on millions of East Germans were laid open, so that any citizen could inspect their personal file on request; these files are now maintained by the Stasi Records Agency.