While several economic depressions and recessions of the 19th and early 20th century certainly hurt the city, their effect was somewhat hampered in Philadelphia  compared with other cities because of its variety of industry. But in 1929, when the Great Depression hit, Philadelphia—like the rest of the country—could not withstand the blow. The effects were devastating to the functioning of commerce and to the well-being of residents. In the three years that followed the stock market crash, 50 banks closed and thousands of residents couldn’t pay mortgages, making foreclosures commonplace. More than half of the savings and loan associations went out of business. In 1933, the unemployment rate was at its highest; blacks were affected worse than whites, and immigrants worst of all.
The mayor at the time, J. Hampton Moore, was considered unsympathetic to the plight of the people, blaming them for laziness. He fired 3,500 city workers, instituted pay cuts, forced unpaid vacation, and reduced the number of contracts. Many groups of workers united and not long after, Philadelphia  became a strong union city, which it remains to this day.
There was a great deal of corruption and fraud in the city government throughout this period. Many had no faith in what they saw as the GOP machine. Mob activity was high, especially during Prohibition, and the city slowly started to shift towards the Democratic Party in hopes of change. The government was exposed on multiple counts of corruption and stealing and in the 1951 election, Joseph S. Clark became the first Democratic mayor in 80 years. Philadelphia has remained staunchly Democratic ever since, with not a single Republican mayor or congressman elected in Philadelphia in more than 50 years.
The beginning of World War II helped bring Philadelphia  out of the Depression as new jobs, many in the defense industry, offered new opportunity. More than 30,000 workers found jobs at the Naval Ship Yard. When the United States became involved in the war in 1941, many Philadelphia men went to serve, while women, African Americans, and workers from outside the city, who had been excluded by unions, filled in for the missing labor force. At the end of the war in 1945, there were around 184,000 Philadelphians in the U.S. armed forces.