After World War II ended, Philadelphia had a serious housing shortage. Around half of the city's housing had been built in the 19th century, and many units lacked proper sanitary facilities, were overcrowded, and in poor condition. Competition for housing, as African Americans (many had come to the city in the Great Migration from the South) and Puerto Ricans moved into new neighborhoods, resulted in racial tension. The wealthier middle-class residents, often white, continued to move out to the suburbs in what became called white flight.