The foundation of the Social Democratic Party of Germany (, SPD) can be traced back to the 1860s, and it has represented the centre-left in German politics for much of the 20th and 21st centuries. From 1891 to 1959, the SPD theoretically espoused Marxism.

The SPD has been the ruling party at several points, first under Friedrich Ebert and Philipp Scheidemann in 1918. The party was outlawed in Nazi Germany but returned to government in 1969 with Willy Brandt. Meanwhile, the East German branch of the SPD was merged with the ruling Socialist Unity Party of Germany. In the modern Federal Republic of Germany, the SPD's main rival has historically been the centre-right Christian Democratic Union. As of May 2025 the SPD serves in a coalition government with the CDU, with Friedrich Merz (CDU) as chancellor and Lars Klingbeil (SPD) as vice-chancellor.

German Reich Before Unification (1861–1875)

While Social Democratic tradition held that the movement was founded by Ferdinand Lassalle in 1863, modern historians argue that it developed out of workers' educational associations () of the 1860s.

These educational associations were initially the effort of multiple classes, including artisan workers, liberal intellectuals, and industrialists. One such society received funding from the Grand Duke of Baden, a Prussian noble. The associations were initially non-political, aiming to educate the poorer classes, though some participants advocated for a political orientation as early as 1861. August Bebel, a turner who would eventually lead the movement, first attended in 1861.

In 1863, Lassalle split alongside a minority to form the first independent workers’ party, the (ADAV, General German Workers' Association). The new party advocated for direct manhood suffrage, and Lassalle's theory of the "iron law of wages." Wilhelm Liebknecht, a veteran of the Revolutions of 1848 and an associate of Karl Marx and Friedrich Engels, first joined the ADAV but, failing to win supporters to his position on the German question, entered the educational societies.

Lassalle's split reverberated within the remaining educational associations. Less than a month after the foundation of the Lassallean party, the educational societies centralized into the (VDAV, Union of German Workmen's and Educational Societies). In 1865, the national leadership unanimously adopted the political struggle for general, equal, direct, and secret suffrage.

Lassalle died unexpectedly in a duel in 1864, precipitating a succession crisis in his party. Jean Baptista von Schweitzer took the leadership of the ADAV, and the Countess Sophie von Hatzfeldt formed a less successful splinter group, the (LADAV, Lassallean General German Workers' Association).

In the leadup to the Austro-Prussian War, the German question was a major point of dispute between the Lassalleans and others in the movement. The Lassallean party advocated independence from and refusal to collaborate with the liberal middle class, and for a Prussian-led "lesser" unification of Germany. By contrast, Marx, who at this time maintained contact with the movement through Liebknecht, advocated independence from and temporary, tactical collaboration with the liberal-democratic movement against the Prussian nobility. Liebknecht and Bebel would eventually support a "greater" German republic, united with Austria by a people's militia. When war broke out, the educational associations took an anti-Prussian position compatible with that of Marx as opposed to the Lassalleans.

Upon Prussia's victory against Austria, August Bebel and Wilhelm Liebknecht founded the (Saxon People's Party), a branch of the middle-class (German People's Party), advocating a democratic “greater" Germany, the abolition of both feudal privileges and internal workers' passports. Bebel was elected in the February 1867 North German federal election to the Reichstag of the newly-formed, Prussian-dominated North German Confederation in 1867 as a member of the Saxon People's Party. That following August, Liebknecht won a mandate as well.

Bebel was elected president of the VDAV 1867, and in 1868 he and his associates split the organization from its original liberal benefactors by proposing adoption of the program of the International Workingmen's Association, later known as the First International. In 1869, Bebel's supporters, alongside some former members of the Lassallean party, gathered in Eisenach and folded the VDAV and Saxon People's Party into the (SDAP, Social Democratic Workers' Party of Germany), also known as the "Eisenachers".

Unification, Illegality, and Legality (1875-1919)

Bebel and Liebknecht's SDAP merged with the Lassallean ADAV at a conference held in Gotha in 1875, taking the name (SAP, Socialist Workers' Party of Germany). At this conference, the party developed the Gotha Program, which Karl Marx criticized in his Critique of the Gotha Program. Through the Anti-Socialist Laws, Otto von Bismarck had the party outlawed for its pro-revolution, anti-monarchy sentiments in 1878; but in 1890 it was legalized again after the successful elections to the Reichstag. That year, in its Halle convention, it changed its name to (SPD), as it is known to this day.

Anti-socialist campaigns were counterproductive. 1878 to 1890 was the SPD's "heroic period". The party's new program drawn up in 1891 at Halle was more radical than 1875's Gotha program. From 1881 to 1890 the party's support increased faster than in any other period. In 1896, the National Liberals and Conservatives in Saxony replaced the democratic vote with a Prussian-style three-tiered suffrage, upper class votes counting the most. They did this to drive out the local SPD which lost its last seat in 1901. However, in the 1903 election, the number of socialist deputies increased from 11 to 22 out of 23.Retallack, Imperial Germany, page 187

Because Social Democrats could be elected as list-free candidates while the party was outlawed, SPD continued to be a growing force in the Reichstag, becoming the strongest party in 1912 (in the German Empire, the parliamentary balance of forces had no influence on the formation of the cabinet). During this period, SPD deputies in the Reichstag were able to win some improvements in working and living conditions for working-class Germans, thereby advancing the cause of its policies in a general way and securing material benefits for its supporters.The German Social Democratic Party, 1875–1933: From Ghetto To Government by W. L. Guttsman As noted by one study, “the SPD played a vital role in the Reichstag’s deliberations to establish an extensive factory inspection system, as well as wide-ranging housing and health regulations.”The Ashgate Research Companion to Imperial Germany, Editor: Matthew Jefferies, Publisher: Taylor & Francis, 2016 edition, originally published in 2014, P.183

In the Landtag, the SPD was able to extract some concessions from time to time in areas for which the assembly was responsible, such as education and social policy. In Hesse, for example, the party was successful in demanding that church tax be listed separately in assessments, and it was able to secure improvements in judicial procedure. The SPD also had occasional successes in raising wages and improving the working conditions of municipal labourers.

SPD pressure in the Reichstag in the late nineteenth century supported an expansion in the system of factory inspection, together with a minor reform in military service under which the families of reservists, called up for training or manoeuvres, could receive an allowance. In the 1880s, SPD deputies in Saxony successfully agitated in support of improved safety for miners and better control of mines. In Bavaria after 1894 and Baden and Hesse after 1891, the SPD cooperated with bourgeois parties in state parliaments.Social Democracy and the Working Class In Nineteenth- and Twentieth-Century Germany By Stefan Berger, Publisher: Taylor & Francis, 2014, P.83

In 1908, the same year the government legalized women's participation in politics, Luise Zietz became the first woman appointed to the executive committee of the SPD.

Despite the passage of anti-socialist legislation, the SPD continued to grow in strength in the early twentieth century, with a steady rise in membership from 384,327 in 1905/06 to 1,085,905 in 1913/14. SPD was seen as a populist party, and people from every quarter of German society sought help and advice from it. With its counseling service (provided free of charge by the mostly trade union maintained workers' secretarial offices), the German social democratic movement helped large numbers of Germans to secure their legal rights, primarily in social security. There also existed a dynamic educational movement, with hundreds of courses and individual lectures, theatre performances, libraries, peripatetic teachers, a central school for workers' education, and a famous Party School, as noted by the historians Susanne Miller and Heinrich Potthoff:

Growth in strength did not initially translate into larger numbers in the Reichstag. The original constituencies had been drawn at the empire's formation in 1871, when Germany was almost two-thirds rural. They were never redrawn to reflect the dramatic growth of Germany's cities in the 1890s. By the turn of the century, the urban-rural ratio was reversed, and almost two-thirds of all Germans lived in cities and towns. Even with this change, the party still managed to become the largest single faction in the Reichstag at the 1912 elections. It would be the largest party in Germany for the next two decades.

In the states of Bavaria, Württemberg, Hesse, and Baden, the SPD was successful in extracting various socio-political and democratic concessions (including the replacement of the class-based electoral systems with universal suffrage) through electoral alliances with bourgeois parties, voting for parliamentary bills and state budgets. In the Reichstag, the SPD resorted to a policy of tactical compromise in order to exert direct influence on legislation. In 1894, the parliamentary SPD voted for a government bill for the first time ever. It reduced the import duty on wheat, which led to a reduction in the price of food. In 1913, the votes of SPD parliamentarians helped to bring in new tax laws affecting the wealthy, which were necessary due to the increase in military spending.

As Sally Waller wrote, the SPD encouraged great loyalty from its members by organising educational courses, choral societies, sports clubs, and libraries. The party also ran welfare clinics, founded libraries, produced newspapers, and organised holidays, rallies, and festivals. As also noted by Weller, they played a role in shaping a number of progressive reforms:

The influence of the SPD on policymaking was noted by one socialist politician, who told the leading American liberal politician William Jennings Bryan that

Another study has noted the positive influence that the SPD had on social reform legislation in the Reichstag by the early Twentieth Century, quoting one observer as such:

According to historian Richard M. Watt:

Social Democratic unions were also increasingly successful in bringing out the start (as noted by one study) “of a collective wage bargaining system in Imperial Germany which covered approximately 2 million workers by 1913.”Social Democracy and the Working Class In Nineteenth- and Twentieth-Century Germany By Stefan Berger, Publisher: Taylor & Francis, 2014, P.87