In the 1950s, governments in Europe and across the Mediterranean tried to ban and discourage women from wearing a new controversial swimsuit: the Bikini. Now, it’s happening again, but with burkinis—the latest front in a long Western war over what women may wear in public spaces shared with men, especially those by the water that lend themselves to states of undress.

Long before specialized swimwear for women was created, women and men were segregated wherever water and recreational activities were combined. By the middle of the 19th century, when the restorative powers of sea water were all the rage, the fashionable set headed to seashore resort towns. Women would be carried into the ocean in “bathing machines” in which they could strip down to their bathing clothes, closer to long dresses than anything we would call swimwear now, and then descend into the water far from the prying eyes of the men on the beach.

The shift to modern swimwear began far from the beach in the mid-19th century, when American women’s rights advocate Amelia Bloomer began promoting a style of clothing then known as “Turkish Dress,” inspired by the less restrictive harem pants of the Muslim Ottoman Empire and intended to let women move more easily while doing things like walking up stairs while carrying children, doing housework and gardening.

Though its vanguards were Bloomer’s fellow feminists Elizabeth Smith Miller and Elizabeth Cady Stanton, the outfit quickly became known, derisively, as a bloomer. And it was considered anything but stylish as the women promoting it were identified with radical reform, not fashion.

Mocked as both ugly and dangerous, the bloomer costume became a favorite of cartoonists in Punch and Harper’s, which both ran numerous cartoons about how ugly and socially dangerous it was to let women wear pants. In just a few years, the outfit was ridiculed into extinction. Stanton attributed its failure to the harassment its wearers received: “Such is the tyranny of the custom…that to escape constant observation, criticism, ridicule, and persecution, one after another gladly went back to the old slavery, and sacrificed freedom of movement to repose.”

Yet no sooner was the name retired than the outfit reappeared, as bathing clothes. Fashion plates from the late 1850s—that era’s equivalent to a fashion magazine photo spread—show attractive and fashionable women wearing outfits that look remarkably similar to the bloomer.

As the reformers had hoped, the costume indeed afforded women more freedom. In the non-politicized incarnation of the bathing costume, women were able to more freely participate in co-ed seaside activities. By the late 1840s, men and women sea-bathing together had lost most of its air of impropriety, and the heavy wool garments allowed women to move around freely in the water without fear of being exposed in front of men.

By the 1870s, the long sleeves of the bathing dress had been cut down to short, capped ones. The bottom hems of bathing dresses moved up, as they had in other forms of fashionable dress, so that by the 1870s they’d reach the keee and by the 1890s moved above it.

By the end of that decade, fashionable dress for women was heavily influenced by men’s styles. The “new woman” as the 20th century approached was epitomized in Charles Dana Gibson’s illustrations of “the Gibson girl”—tall, elegant and almost always partaking in some physical activity. This “new” woman was likely to wear divided skirts, knickerbockers and tailor-mades, a fashion that reflected and perhaps anticipated the ever more overlapping male and female social worlds.

Equality, having established a beachhead, was making its way forward. On the beach itself, a one-piece bathing garment, often sleeveless and ending upper-mid thigh, had become a fashionable item for beachwear and for swimming by the 1920s. The style helped create the template for our ever-smaller modern swimsuits, and we eventually began to use the terms ‘swimsuit’ and ‘bathing suit’ interchangeably without much thought about the long road that garment had to travel to be considered a woman’s swimsuit and how not so long ago the idea of women swimming would’ve seemed absurd.

By the late 1940s fashion stepped ahead of function when the bikini was introduced. No longer serving the function of swimming, the bikini was purely fashion and bared much of a woman’s body. Although it was once highly controversial, the bikini is now a mainstay in Western women’s beachwear. The bikini has almost moved past fashion into uniform status, so much so that not wearing one sometimes seems to suggest a woman’s body is not appropriately in fashion enough to wear one attractively.

Bloomer’s costume, derided when her name and cause were attached to it, succeeded as a small step in dress reform once those ideologies were stripped from it, helping pave the way for women to join what had been exclusively male activities.

Now it is the burkini, intended to let Muslim women who follow religious dress codes (along with any others who fear the sun or public exposure of their bodies) enjoy the beach, that is intended to open the world up to these women much as the Bloomer-like bathing costume did for Western women more than a century and a half ago.

A suit that closes off the body can, over time, help open the world.