It's been a steamy week. Let's cool off with the story of Philadelphia's city pools.

First, some background. The earliest recorded man-made pool splashed down 5,000 years ago in what is now Pakistan. Greeks and Romans followed suit.

Swimmers celebrate opening day of the Hunting Park Pool on June 18, 1944.
Historical Society of Pennsylvania
Swimmers celebrate opening day of the Hunting Park Pool on June 18, 1944.

Swimmers celebrate opening day of the Hunting Park Pool on June 18, 1944.In Philadelphia, the first watering holes served as tools for bolstering public health.

"The pool was the instrument of cleaning," observed historian Jeff Wiltse.

Consider that, in 1850, the majority of Philadelphians lacked indoor plumbing. Rivers and streams presented the only opportunity for many to bathe.

Men and women unable to afford trips to the Jersey Shore undressed and scrubbed down in the Delaware and Schuylkill. Buttoned-up city officials were horrified.

"Swimmers enjoying their first laps of the season in public pools … can thank the naked working-class boys of the Victorian era for the luxury," said NPR's Debbie Elliot.

Philadelphians experimented with "floating baths" in the Schuylkill after the Civil War until the water became "unfit for domestic use."

The first pool, the Wharton Street Bath in South Philadelphia, appeared in 1884. Eight such facilities followed by the end of the century — more than any other city in the country.

These Spartan concrete squares clocked nearly 1,500 patrons per day. In an era before chlorine and sand filtration, pools often had to be drained and refilled weekly.

Men and women did not swim together. Typically, three days per week would be set aside for each sex with Sundays split evenly.

While segregated in this sense, race played a lesser role than we might assume. A snobbish Boston bureaucrat indirectly confirmed this during a visit to the city in 1899: "I must say that some of the street gamins, both white and colored, that I saw, were quite as dirty as it is possible for one to conceive."

"Pool use divided along class lines — but not ethnic or racial lines — because city officials, reformers, and the middle-class public viewed the working classes en masse as 'the great unwashed,' " Wiltse continued. "Middle-class Americans at the time perceived immigrants, laborers, and blacks as equally dirty and prone to carry communicable diseases."

As communal open-air baths, pools were a failure. For one thing, they were open only during the summer months. And kids did what you might expect when in the water — they had fun. Their parents did, too, for that matter.

As places for recreation, pools expanded in the 1920s and 1930s. Boulevard Pools in Mayfair sported locker rooms, picnic tables, and water shows. Accommodating 6,000 swimmers, it was one of the largest such outdoor facilities in the country.

Segregation by sex and class subsided while "swimmers refashioned attitudes about the body and cultural standards of public decency by what they wore and how they presented themselves at municipal pools," Wiltse observed.

But all was not bonhomie poolside. Race replaced class as the criterion for who was welcome to swim.

"White [men] were mainly concerned about black men interacting with white women — they feared the sexual atmosphere at a pool might promote racial mixing," said Micaela Root, a former city lifeguard and editor of the Swimming Philadelphia blog.

As with public transportation and education, pools across the country became a battleground for civil rights. Before Brown v. Board of Education, before the Montgomery bus boycott, a young Thurgood Marshall successfully sued Kansas City to integrate a public pool in 1951.

White swimmers largely abandoned them. Residential pools and private swim clubs proliferated after the Second World War in Philadelphia and nationwide.

With diminished numbers, the city found it easier to skimp on maintenance and expansion. Then, as now, pools are easy to sacrifice when potholes are diving-board deep.

Today Philadelphia boasts 73 indoor and outdoor public pools. That tops Chicago and New York. But in terms of amenities, many resemble the public baths of the 19th century or look as if they belong to a Soviet prison.

In the summer of 1937, admission to city pools reached 4.3 million. Philadelphia recorded less than a million swims in 2013.

"What if they weren't so desolate looking?" asked Philadelphia Magazine's Malcolm Burnley. "What if, in other words, we treated these pools like the incredible civic assets that they actually are?"

Vincent Fraley is communications manager for the Historical Society of Pennsylvania.