Jeff Wiltse is an associate professor of history at the University of Montana and author of the book "Contested Waters: A Social History of Swimming Pool in America."

Protesters listen during a rally against what demonstrators call police brutality in McKinney, Tex. (Mike Stone/Reuters)

Last weekend, a harrowing scene unfolded at a private community swimming pool in McKinney, Tex. Several white adults taunted a group of black teens, telling them to “go back to your Section 8 homes.” Another reportedly referred to one of the teens as a “black effer.” The police were eventually called in, responding with aggressive and unreasonable force.

Americans were shocked by the scene, which was caught by camera phones. But I wasn’t surprised.

Swimming pools have long been contested spaces where Americans express social prejudices that otherwise remain publicly unspoken. (Though the McKinney pool isn’t open to the general public, it was being used by a resident to host a party with friends from outside the neighborhood, like someone might do at their own neighborhood pool.) They provide insight into the state of social relations in America, both past and present.

McKinney Police Cpl. Eric Casebolt resigned after pulling his gun on a group of teenagers at a pool party in June 2015. A witness uploaded this video of the incident to YouTube. Editor's Note: This video has been edited. (Courtesy of Brandon Brooks)

The earliest public pools were built in large northern cities during the late 19th and early 20th centuries. They served mostly poor and working-class boys (both black and white), and reveal the class prejudices of the time. In 1910, for example, the proposal to build a large municipal pool in New York’s Central Park generated intense opposition from the city’s middle and upper classes, because it would attract large numbers of immigrant and working-class kids into their oasis of genteel recreation. “I should consider it disastrous if the only swimming pool belonging to the city was put [in Central Park],” one critic told the New York Times. “It would attract all sorts of undesirable people.” The paper agreed and recommended that municipal pools be located underneath the Manhattan and Queensboro bridges. These locations would have effectively secluded working-class swimmers, protecting the city’s class-segregated social geography.

The design of pools and the social composition of swimmers changed during the 1920s and ’30s, when cities across the country built large, resort-like swimming pools and allowed males and females to use them together for the first time. In northern cities such as Chicago, New York and Pittsburgh, gender integration brought about racial segregation. Public officials and white swimmers now objected to the presence of black Americans because they did not want black men interacting with white women at such visually and physically intimate spaces. And so, throughout the North, public pools became racially segregated during the interwar years.

In some cases, white swimmers imposed de facto segregation through violence and intimidation. At Pittsburgh’s Highland Park Pool, for example, white swimmers attacked black swimmers — sometimes with rocks and clubs — to prevent them from entering the pool. Police officers encouraged these attacks and typically arrested the black victims, charging them with “inciting to riot.” In attempting to explain why black swimmers were being attacked at Highland Park Pool but not at other city pools, the Pittsburgh Courier wrote: “The whole trouble seems to be due to the way Highland Park Pool is operated. It is the only city pool where men and women, girls and boys swim together. This brings the sex question into the pool and trouble is bound to arise between the races.”

The same type of trouble had no chance to arise at public swimming pools in the South and Mason-Dixon line cities such as St. Louis and Baltimore, because public officials mandated racial segregation, explicitly barring blacks from entering “whites-only” pools.

Across the country, public swimming pools were racially desegregated after World War II, but that was met with widespread opposition from whites that again exposed their social prejudices. Southern cities typically shut down their public pools rather than allow mixed-race swimming. In the North, whites generally abandoned pools that became accessible to blacks and retreated to ones located in thoroughly white neighborhoods or established private club pools, where racial discrimination was still legal.

Warren, Ohio, for example, was forced by a pending court order to desegregate its municipal pool in 1948. The local newspaper covered the first day of interracial swimming by printing a front-page photo showing a dozen children waiting to enter. The last two children in line were black; the caption read: “Last one in the water is a monkey.” The racial antipathy expressed in the newspaper was shared by many local whites, who stopped using the pool when they realized black residents intended to use it. Similarly, in 1962, several years after Pittsburgh’s municipal pools were desegregated, a sign posted outside a city pool still used exclusively by whites read “No dogs or niggers allowed.” Public pools were racially desegregated, but that did not mean blacks and whites started swimming together.

Even today, there are examples that things haven’t changed that much. In 2009, 65 black and Latino campers from the Creative Steps day camp in North Philadelphia arrived at the Valley Swim Club in suburban Montgomery County to play for an hour and a half. Camp director Althea Wright had paid the private club $1,950 to use the facility Monday afternoons throughout the summer. As the campers entered the water, some club members reportedly pulled their children from the pool and wondered aloud what all these black and Latino kids were doing there. A few days later, the Valley Swim Club canceled the lease agreement. When pressed to explain, the club president stated, “there was concern [among the members] that a lot of kids would change the complexion … and the atmosphere of the club.”

We do not see this type of behavior in other public spaces such as parks. Why do swimming pools bring out the worst in people?

Part of the answer has to do with the uniqueness of swimming pools as physical spaces. They are visually and socially intimate. Swimmers gaze upon one another’s nearly naked bodies, lie in the sun next to one another, navigate through crowded water and flirt. This type of contact and interaction piques social anxieties and exposes the lack of trust and understanding between people of different social classes.

Swimming pools have also been intensely contested because they are places at which people build community and define the social boundaries of community life. Swimming pools are primary summertime gathering places, where many people come together (often for several hours), socialize, and share a common space. Swimming with others in a pool means accepting them as part of the same community precisely because the interaction is so intimate and sociable. Conversely, excluding someone or some group from a pool effectively defines them as social others—as excluded from the community.

For these reasons, swimming pools serve as useful barometers of social relations. If we as a nation want to know how we relate to one another across social lines, how we structure our communities socially, and how we think about people who are socially different from ourselves, just look at our swimming pools. The answer will be obvious.