If you have a refrigerator with an ice machine built into it, you’ve probably gotten pretty used to the luxury of strolling over to that fridge and filling up a glass with fresh ice. It’s a luxury that has only relatively recently been possible, and the history of that seemingly commonplace appliance has more twists and turns than you might have imagined. Learning more about the history of the first ice machine can help you appreciate the many people that helped make it all possible.

Humble Beginnings

Before modern refrigeration and freezing technology, people around the world used a variety of resourceful ways to get, store and make ice. Persians invented a brilliant facility called a yakhchal, according to STSTW Media. The conical structure with a subterranean pit was used to store and make ice as far back as 400 B.C. Egyptians used to set out clay pots filled with water to freeze on chilly nights. In other parts of the world, people harvested naturally occurring ice, sometimes under incredibly dangerous conditions, and stored it in underground pits.

Demand for ice grew over the centuries as people realized the importance of ice for tasks including refrigerating food to prevent illness and preserving medicine. In addition, people were developing a taste for cool treats like chilled beverages and ice cream.

First Ice Machine

One of the first people to try to capitalize off that growing demand was Frederic Tudor, a New England man now known as “The Ice King,” according to many historical records including one from the New England Historical Society. His career had many highs and lows, though by the 1840s he was able to find safer ways to harvest ice, perfect ice shipping methods and establish ice trade routes across the world.

Around the same time, an American doctor named John Gorrie built off the designs of the first refrigerator plans to create a machine that made ice. His goal was to help keep his patients, many of whom had diseases like yellow fever and malaria, cool and comfortable. But even though his machine was intended to help ill patients, he wasn’t immune to the satisfaction of a cool drink. He unveiled his device at a muggy outdoor celebration for Bastille Day, announcing that it was possible for all the hot festival-goers to now drink chilled wine.

The chilled wine was a hit. Unfortunately, after that debut Gorrie didn’t see his invention completely appreciated during his lifetime. He couldn’t secure much of the capital he needed to create more practical models of his machine, partially because of a smear campaign led by Tudor, and his subsequent models were mocked for performance issues like leaking.

Today, however, people understand that his innovative method of compressing, condensing, throttling and evaporating air was critical in creating the modern ice maker, and Gorrie's Patent Model Ice Machine is featured in the National Museum of American History. He also understood the compressor could be powered by several different sources of energy, including water, horsepower, sails or steam to create a steam powered ice machine. Gorrie is known as the father of refrigeration and air conditioning.

Read more: How to Get Rid of the Bad Taste in Ice Cubes From the Fridge

Next Wave of Ice Makers

Throughout the next several decades, inventors around the world continued to build off of those designs to create more sophisticated devices. Engineers in places including Texas, Germany and Australia designed and received patents for successful ice making machines. Though each successful in their own way, none were foolproof.

The biggest issue to surface was the use of toxic gases in the ice making process, according to the Environmental Protection Agency (EPA). Throughout the 1920s, injuries and even deaths occurred because manufacturers used flammable, toxic or highly reactive products like sulfur dioxide and methyl chloride as the refrigerant. Those chemicals would leak out from the fridge, causing dangerous inhalation issues or explosions.

As a result, several scientists started looking for safer alternatives. In 1928, two inventors named Thomas Midgley Jr. and Charles Franklin Kettering created a compound they called Freon, made up of chlorofluorocarbons, or CFCs. Within years, Freon became the standard refrigerant. Though it eliminated the deaths from refrigerator leaks, we now know that CFCs are in part to blame for the depletion of the ozone layer, the EPA notes.

Read more: Types of Refrigerant for Freezers

Built-In Ice Makers and Beyond

After the Freon discovery, manufacturers were able to more safely experiment with ice making machines. By the 1950s, a company called Servel was making a refrigerator that had an ice maker built into the freezer portion. In 1965, Frigidaire introduced a model with the machine built right into the door, a feature that is now commonplace in fridges around the world.

As the decades went on, manufacturers learned how to make different types of ice and ice-making machines. The first built-in ice makers made the crescent-shaped ice cubes you may have seen before, but before long, scientists figured out how to create molds to make ice in cubes similar to the ones that would come from a traditional ice tray. Manufacturers also began making ice making machines that could stand alone, such as the ones you'll see in the kitchen of a restaurant or at a bar, as well as smaller portable ice machines that could sit on a countertop or be easily transported and used for small events where ice was needed.

Read more: Troubleshooting Your Icemaker

Additionally, ice makers were moving far beyond the home appliance industry. Manufacturers learned to make industrial-sized ice machines to provide several different cuts of ice for applications including the storage of meat and produce around the world, cooling concrete, creating artificial snow for theme parks or athletic events, important cooling mechanisms during manufacturing processes, producing fuel and freezing fresh vegetables or fish. Plus, millions of restaurants and bars use ice machines in order to keep their patrons happy with the frozen or ice cold drinks that people around the world have come to love.

Sometimes, people tend to take advantage of that easy access to ice, as well as to features such as built-in ice machines in the fridges of our homes and workplaces. But perhaps next time you stop at the gas station to fill a cup with ice and bubbly soda, or enjoy drinking a cold glass of ice-cold water on a hot day, you'll remember all the inventors, tinkerers and scientists who made that luxury possible.