On Wednesday, President Trump displayed a National Weather Service map in the Oval Office showing Hurricane Dorian’s cone of uncertainty (the probable paths of its center). The map had been crudely altered with a Sharpie to extend the cone into Alabama in an attempt to align the map with the president’s earlier tweet falsely claiming that the hurricane was forecast to hit the state.

Social media commentators and late-night talk show hosts mocked #Sharpiegate as an absurd and brazen falsehood that not only flouted reality but also broke the law.

That last criticism was news to many. Until this week, few Americans knew that a provision in the U.S. Code titled “False weather reports” makes it a crime to falsely claim the authority of government weather science: “Whoever knowingly issues or publishes any counterfeit weather forecast or warning of weather falsely representing such forecast or warning to have been issued or published by the Weather Bureau, United States Signal Service, or other branch of the Government service, shall be fined under this title or imprisoned not more than ninety days, or both.”

While this might seem like overkill in a world in which we have accurate weather information at our fingertips, the law has a valuable purpose, one that is likely to become even more critical in the coming years as the impact of climate change intensifies.

Congress established the false-reports law in 1894, when the government Weather Service was still relatively new. At the time, weather forecasts were harder to come by than they are today. In the late 19th century, Americans consulted newspapers for the daily short-term forecast, which was produced by a telegraph network that collected data from individual observers throughout the country. For longer-term forecasts, they relied on commercially produced forecasts and time-honored almanacs, which were inconsistent but occasionally accurate enough to win a wide following.

In response to deadly storms on the Great Lakes, the government decided to get into the weather game to provide more accurate forecasts free as a public good. Such forecasts were a valuable risk-management tool for businesses, shippers, manufacturers, farmers and anyone who wanted to prepare for the next day’s weather.

But for these new forecasts to benefit the public, Americans needed to be able to trust the information. This required the Weather Bureau to communicate that it would provide the most accurate available information, while discrediting popular competitors. These included “weather prophets” and almanacs that weren't based on reliable local data or accepted meteorological science. But they also included something far more dangerous: “counterfeit” forecasts that could cause unnecessary panic.

Lawmakers and weather officials had reason to be concerned. After all, such false reports had already spread alarm. In one case from the 1890s, a theater company in the Midwest posted tornado warning signs as part of their promotional materials for an upcoming performance, which caused schools to close and residents to take shelter from a storm that never came.

In September 1906, the Sioux City Tribune triggered widespread panic when it published a sensational article predicting the arrival of “one of the worst hurricanes in history.” The article warned that the hurricane would “devastate the Mississippi valley” on its way to Iowa and potentially wipe out life in Sioux City. The National Weather Service had predicted no such thing, but a local reporter thought such a dramatic forecast would make a “good story.” Two days later, another Sioux City newspaper ran an article titled “Weather Lies are Costly” that warned, “It is dangerous business to distort forecasts of the United States weather.”

Government officials agreed, and also feared an additional risk. In 1903, a top Weather Bureau official warned that false weather forecasts would cause both “public injury and discredit to the Weather Bureau,” which could lead Americans to ignore crucially important — even lifesaving — information. These dangers compelled Congress to pass the law making counterfeit forecasts illegal.

The new law made it possible for the Weather Bureau to target opportunists and hucksters. It also gave officials the tools to try to suppress weather-related advertising in the early days of modern consumer culture. Companies that sold weather-related products ran afoul of government weather officials when they modified official storm warnings in their advertisements or just invented forecasts to help them market their products (like the seller of coal who ran an advertisement titled, “Cold Wave Coming”).

While rare today, violations of the law were commonly investigated in its early years, usually ending with companies taking down ads under threat of prosecution. These incidents raised important questions. Fifty different cases of weather counterfeiting in the late 19th and early 20th centuries added up to a legal dilemma for government officials, retailers and advertisers: Who had the right to commercialize scientific knowledge produced by the federal government? Was it fraud or just savvy advertising to profit off weather forecasts as a public good?

By the mid-1920s, government weather officials realized that their authority as the official government weather agency could coexist with the growing advertising profession. The U.S. Weather Bureau began to encourage the use of accurate weather information in commerce, and advertisers eagerly incorporated weather maps and forecasts into their marketing strategies. And retailers, mindful of the law against counterfeit weather forecasts, no longer scrawled their own forecasts on pieces of paper to display in the storefront to draw public attention.

The connection between government weather forecasts and commerce only grew stronger during the 20th century, with the postwar rise of consulting meteorology and the emergence of private weather services like AccuWeather and the Weather Channel Companies. Today, we are not surprised to find online advertisements for umbrellas and raincoats linked to our local weather forecast, but the 1894 law requires those ads be linked to accurate weather data. While companies might still capitalize on federal expertise, at least consumers won’t be misled nor government forecasts discredited.

In the case of the Sharpie-altered map of Hurricane Dorian, public injury may well have been caused to residents of Alabama who believed the president’s Twitter warning and scrambled to prepare for a devastating hurricane that was claiming lives and destroying property elsewhere. The NWS had to issue a statement emphasizing that Alabama would not actually be affected.

As climate change contributes to more rapid intensification of hurricanes, the public will need to rely more than ever on NWS maps and National Hurricane Center advisories to make quick decisions about whether to evacuate ahead of a deadly hurricane. The hundreds of millions of residents living at risk of dangerous weather in the United States need to have full confidence that government weather forecasts and storm warnings are functioning as they are intended: protecting lives and property as a public good.

The president undermined such trust, and while his stunt might be written off as fodder for late-night comics, it’s no joking matter: Falsified forecasts can put lives at risk, something the National Weather Service has been protecting us from for more than a century.