Leisurely swimming emerged in the 19th century, when trains and cars democratized coastal beaches. Suddenly, weary urbanites could venture out of their cities and seek a respite at the water's edge. But dressing for these new aquatic adventures, particularly for women, was anything but liberating.

1888 | French bathing costumes. | (Hulton Archive/Getty Images)

1878 | (Amoret Tanner / Alamy Stock Photo)

In the 19th century, modesty was the driving trend in female fashion. Clothing was meant to cover the threatening curves of the female form: Necklines were high, hips were hidden, and faces were shaded with wide-brimmed hats and bonnets.

So when beaches became popular destinations for middle- and upper-class families, women were expected to adhere to the cumbersome streetwear styles of the time. The results were a little awkward, if not outright dangerous.

Women refashioned old, long frocks for their beach excursions, sewing weights into the hems of their skirts so they wouldn't float up as they entered the water. Fabrics were often woolen, which meant they were heavy and, of course, clingy when wet.

1800s | Artwork, by William Heath, of women swimming at Brighton, England. | (Hulton Archive/Getty Images)

But even full-body attire could still offend onlookers, so women were carefully protected from the male gaze during their seaside visits. Beaches were often segregated, and women used "bathing machines" — buggies that were pushed or drawn by horses into the water — to limit their exposure.

A bathing machine could also be equipped with a "modesty hood," which allowed women to submerge themselves in private. And submerge is, really, all they were permitted to do. Men swam; women bathed.

Early 1900s | England | (The Keasbury-Gordon Photograph Archive / Alamy Stock Photo)

As swimming went from novelty to Olympic sport at the end of the 19th century, women's swimwear remained stubbornly stunted, particularly in Europe and America. Pants and shorts were worked into bulky one-pieces, which allowed women a modicum of function in the water, but the outfits were still absurdly layered: Knee-length bloomers were worn under one-pieces that were covered by an apron-like piece of fabric wrapped around the waist. The more prudent women added black tights to the ensemble.

Thankfully, the woolen materials of the past had been traded in for a cotton blend.

1901 | A turn-of-the-century bathing suit. | (Library of Congress)

Early 1900s | (Glasshouse Images / Alamy Stock Photo)

1915 | Coney Island. | (The Protected Art Archive / Alamy Stock Photo)

It would take an Australian swimmer named Annette Kellerman to truly modernize women's swimwear. Besieged by rickets, Kellerman began swimming at the age of 6 to help strengthen her legs. By the age of 15, she was swimming competitively and putting on diving and underwater exhibitions.

Australia was only slightly more lax about swimwear. By the time Kellerman was born in 1886, Australian female competitive swimmers could enjoy the freedom of a knee-length one-piece, basically a man's swimsuit. But when Kellerman was invited in 1905 to perform in front of the royal family in England, she was prohibited from wearing her suit because it exposed half her leg. Not willing to compete in a billowing dress, Kellerman sewed black stockings onto the bottom half of her swimsuit.

Early 1900s | Annette Kellerman in her one-piece bathing suit. | (GL Archive / Alamy Stock Photo)

In 1907, when Kellerman dared to wear her short one-piece for a competition in Boston, she was arrested for indecent exposure. The judge eventually ruled in her favor, agreeing that cumbersome bathing suits weren't ideal for exercise swimming.

The arrest gained global attention and Kellerman began designing her own line of one-piece swimsuits. But it would take at least a decade for the "Annette Kellerman" to catch on.

1913 | A Danish illustration. | (Chronicle / Alamy Stock Photo)

1922 | Essex, England. | (Topical Press Agency/Getty Images)

In hindsight, Kellerman's brazen bathing suit marked a liberating turning point in swimwear, but at the time, the look emboldened a conservative crackdown, particularly in the U.S. Police in New York, New Jersey, and even Hawaii patrolled beaches, measuring hem lines to ensure that the legs and arms of beachgoers were properly covered. Those who didn't meet the requirements were asked to change, banned from the beach, or even arrested.

This war on swimwear would continue for decades. Kellerman's one-piece style was banned in parts of the U.S., and short suits were blamed for endangering the "morals of the children."

1922 | A bathing beach "cop" measures the distance between a woman's knee and the bottom of her suit in Washington, D.C. | (Library of Congress)

1935 | Palm Beach, Florida. | (Photo by Hulton Archive/Getty Images)

Nevertheless, the beachgoers persisted.

In 1921, a 39-year-old novelist from Los Angeles named Louise Rosine was arrested in Atlantic City for refusing to wear the required stockings. "The city has no right to tell me how I shall wear my stockings," she said. "It is none of their darn business. I will go to jail first."

The 1920s also saw the birth of three bathing suit companies that helped push the sale and popularity of the one-piece suit across America. One of the more daring options, the "Prohibition Suit," sported a low-cut neckline and a tiny skirt. Though the censorship enforcement didn't completely disappear, it faded considerably by the 1930s as the culture began to embrace personal health and fitness.

And in 1946, a French engineer named Louis Reard introduced the world to the bikini. What remained of the public puritan attachment to female modesty didn't stand a chance.

1950 | Eastborne, England. | (Norman Vigars/Fox Photos/Getty Images)