Alarms were going off on the International Space Station. Mission control put emergency procedures into action. Up in space, astronauts were being evacuated from different modules and forced to camp out in the Russian section. The cause of all this palaver was not an alien invasion or artificial intelligence gone rogue—not even a meteor shower or sudden solar flares. No, the gremlin in the works was something mundane: a faulty sensor on an air-conditioning unit.

This all took place around breakfast time one January morning, but it might as well have been any of a string of similar incidents. Last November it was errant Freon-218 gas in the Russian Zvezda service module. The year before, an urgent software reboot was called for when one of the two thermal-control loops went down. Back in 2010, an unplanned spacewalk was conducted after a power surge blew one of the cooling pumps. Each time the problems were gleefully reported in the terrestrial press and shared on social media. And each time, the fault lay somewhere in the Space Station’s HVAC (Heating, Ventilation, and Air Conditioning) systems.

It’s strangely comforting to know that even in the brave new world of space, such familiar and trivial mishaps remain a source of frustration. We’ve all been there. Ugh, the A/C’s down! Blasted thing’s got a life of its own. No wonder they’re having troubles up in space if it can’t even work properly in Orange County. Meanwhile, whatever their faults up there, air-conditioning manufacturers down here love to boast that their systems utilize NASA-developed technology on the International Space Station. The glamour of space is invulnerable.

As it turns out, air conditioning and outer space have a history that goes back further than ballpoint pens that write upside down and infrared ear thermometers. Back when artificial atmospheric-processing techniques were first unleashed on urban populations, the West was in the midst of a Martian mania which left few aspects of popular culture untouched.

* * *

By the last quarter of the 19th century, the industrial revolution was making the air in big cities increasingly unpalatable. London was cloaked in smog that a string of public-health acts had done little to abate. The U.S., too, was hearing its first municipal ordinances against smoke emissions from mills, ships, and steam trains. In every case, the effects were at their worst during summer as the hot upper atmosphere hindered circulation. Our will to master nature had begun to make the natural environment itself less hospitable.

Utopian writers like William Morris dreamed of a world without the fog of industrial production. In his News from Nowhere of 1890, one of the first sensations the narrator experiences upon waking up in a future London seemingly returned to a mythical arable past, is “a delicious relief caused by the fresh air and pleasant breeze.” Shorn of mills and engines of all kinds, Morris’s vision of an idealized English capital finds “a fresh feeling in the air” once more.

As it turned out, the ideal for such freshness would turn out to be celestial rather than terrestrial. In 1877, the Italian astronomer Giovanni Schiaperelli first dubbed the lines he saw on the surface of Mars “canals,” a term suggestive of possible human use and delight. Mars erupted into newspaper stories, narrative fiction, popular song—even advertisements for hand soap. As the 19th century drew to a close, the human desire for slightly cooler air found its technical acknowledgement—in a utopian dream focused on space in general and the the red planet in particular.

Few imaginary voyages to Mars took place in this period without offering up some sample of the Martian atmosphere. The spacefaring newlyweds from British author George Griffith’s Honeymoon in Space find the air on Mars so “delicious” that it’s like “breathing champagne.” The mysterious titular protagonist of Hugh MacColl’s Mr Stranger’s Sealed Packet would likewise find “the Martian air deliciously refreshing” with an “unmistakable … aromatic odour.” And in 1889, the French astronomer Camille Flammarion would imagine the inhabitants of Mars taking succor directly from the “nutritive” properties of their own atmosphere in his poetic fantasy Urania. If the air down here was increasingly rank and fetid, on Mars it was starting to sound like a three-course reception with full bar service all ready to suck up through your nostrils.

The air on Mars wasn’t just delicious—more importantly, it was cool and not too clammy. The heroes of Robert Cromie’s novel from 1890, A Plunge into Space, wake upon their first morning on Mars to praise the “delightful dryness of the air.” A vision of Mars conjured up in W.J. Colville’s almost contemporary Dashed Against the Rock notes that the air “seemed very clear, bracing.” And the communist revolutionary and science-fiction writer Alexander Bogdanov would later agree that the Martian atmosphere is “pure and clear.” Even in 1949, Robert Heinlein, who really should have known better by then, would speak of how the “thin air of Mars was chill but not really cold” as if somebody up there had got the planetary thermostat at just the right level.

Already, in the age of Flammarion, the first attempts at public air-cooling systems were being rolled out in parts of America, running cold air down a pipe from a centralized depot like gas or water. For the most part, such schemes were targeted at industrial applications. In Boston, New York, Baltimore, and Los Angeles, subscribers in central business districts could keep their meat lockers mechanically refrigerated for a small monthly fee. Only in St. Louis, Missouri, did the enterprising proprietor of the Ice Palace restaurant choose to turn the pipes on his customers and use the cold air for comfort in a neat marketing gimmick complete with photos from the Kane Polar Expedition and a frost-covered sign in the front window.

But air conditioning proper was never just—or even primarily—about cooling. First coined by a North Carolina textile mill engineer named Stuart Cramer in 1906, to its original practitioners “air conditioning” always meant cleaning, circulating, and controlling humidity. As far as those guys were concerned any sign on the door of your convenience store with a big polar bear promising 20º cooler was just bringing the whole industry into disrepute. As far back as 1880 a work of fiction had already explored the need for a kind of atmospheric processing beyond mere refrigeration—and it did so en route to the planet Mars.

In Cromie’s A Plunge into Space, all that was necessary to maintain a breathable onboard environment in space was that the crew forego their usual taste for pipes and cigars. Percy Greg’s Across the Zodiac, however, not only coined the word “astronaut” for the first time—it also recognized the need for some serious HVAC. Greg offers a detailed description of the system of fans used to drive the air in his ship over lime-water and chlorate of potash in order to soak up the carbonic acid and re-oxygenize the air. Thus prepared, one of fiction’s very first visitors to Mars is able to allow himself “a very small cigar” after his inflight meal.

As Marsha Ackerman, author of Cool Comfort: America’s Romance with Air Conditioning, points out, the early days of the air-con game were “steeped in nineteenth century utopianism.” “Our work,” pledged Syracuse engineer Edward P. Bates to the first meeting of the American Society of Heating and Ventilating Engineers (ASHVE), “will not stop with any class; it will benefit all classes.” The promise of its marketing was nothing short of “man-made weather…to make every day a good day.” So it should come as little surprise that some of the biggest showcases for the technology in its infancy were at those ephemeral theme parks to the world of tomorrow: America’s World’s Fairs.

* * *

In 1904, the Missouri State Building at the St. Louis World’s Fair was already being artificially cooled, leaving visitors “struck with wonder,” according to the report of Ice and Refrigeration Magazine, and “unable to account for the very perceptible change felt in the temperatures.” But it was in New York in 1939 that they really went to town. Willis Carrier, one of two or three contenders for the title “father of air conditioning,” installed a huge “Igloo of Tomorrow” on the Fair site at Flushing Meadows, complete with a fake aurora borealis playing on the ceiling.

Some 1.3 million visitors popped into the Carrier Igloo in its first 100 days, cooling their feet at the “Cold Dog Stand” or learning the secrets of this seemingly semi-divine new science in the “Hall of the Weathermakers.” With the Depression coming to an end, the World’s Fair was a major push towards the mass take-up of air con—no longer just in factories, theaters, and shopping malls, but in suburban homes across the country.

By that time, everyone—save Robert Heinlein, apparently—knew that you wouldn’t find much to breathe on the surface of Mars. Surviving on another world would require specially-designed sealed habitats. But then sealed habitats were getting more and more common on Earth. If the astronauts in Arthur C. Clarke’s 1951 novel, The Sands of Mars, would moan about the constant need to “breathe packaged air and drink packaged water,” the plaint would sound familiar to a decade of ham sticks and cheeseburgers-in-a-can. In that first golden age of processed food, the engineers who installed domestic and industrial air-con systems were increasingly recognizing the need for a totally controlled environment. And that meant windows and doors must be kept closed.

Before Norbert Wiener published his landmark books of the late 1940s, air conditioning already represented a totally-integrated cybernetic system. Amidst an atmosphere of stiff competition as the industry grew rapidly through the first half of the twentieth century, engineers took to making guarantees about cooling power and humidity. If the air was too dry, cotton was too brittle to spin. Too damp, and chocolate turned grey and machinery jammed. Air-con salesmen promised factory bosses a dream climate—all the year round.

But they soon realized that in order to achieve it, they had to conceive of every element inside the factory as part of a dynamic system. It wasn’t just the size of the space that affected the air but the way the machinery was used, the habits of the workers. In order to meet their guarantees, the engineers demanded more and more control over aspects of the production process previously left to the dictates of management or the whims of the workers. Work patterns and production processes were fixed and locked-down. Windows and doors were to be kept shut at all times.

It was all about creating an environment as controlled and contained as a laboratory. The result was an engineer’s paradise. But it severed the final links between the manufacturing process and its surrounding natural environment. Formerly, production had retained seasonal peaks and lulls. Workers had learned to regulate the humidity affecting their materials and machinery—not to mention their own comfort—by opening or closing nearby windows. In these ways, the world and its uncertainties had entered into industrial operations, managed and tempered by the judgment of a skilled workforce. Now the factory was as hermetically sealed as a lunar base. And the same principles were steadily creeping out of the factory, into shopping malls, theaters, and homes. It was as if we were preparing to colonize and terraform our own planet.

In 1897, the Martian invaders in H.G. Wells’s War of the Worlds had finally been seen off by an airborne bacterial infection. Almost immediately afterwards, air-conditioning engineers had set about making sure any such visitors would find plenty of safe spaces to roam about.

A century later and 98 percent of American cars are built with air conditioning and 83 percent of American homes have at least one air-conditioned room. We live ever more sealed-off lives. Drifting through the Mall of America or London’s Bluewater shopping centre, would it make any noticeable difference if the whole thing were transported to Mars?

Only, perhaps, when something broke down and needed fixing.