The anti-vaccination movement has hit a wall. After years of flourishing on the margins of the political spectrum, activists and their political enablers are on the defensive, as long-dormant diseases come back with a vengeance.

This description fits the intensifying uproar over the reemergence of measles and whooping cough in 2015. It applies just as well to an outbreak of smallpox in 1894. Then, as now, a small, vocal group of anti-vaccination activists wedded junk science, bogus statistics and appeals to emotion to try to undermine a previous vaccination campaign.

The 19th-century predecessors of today’s anti-vaxxers also acted out of a genuine conviction that vaccines posed huge health risks. And then, too, beliefs, no matter how heartfelt, weren’t a sensible substitute for an objective evaluation of risk. It’s a lesson likely to be hammered home in the coming years, as diseases make a comeback in the U.S., empowered in some cases by the rising refusal of parents to vaccinate their children.

The concept of vaccination, which essentially involves using prophylactic exposure to a disease to trick the body into developing immunity, was controversial from its beginnings.

In the 18th century, doctors in Britain began taking the pus from a smallpox sore on a patient with a “mild” case of the disease and rubbing it into the open wound of a healthy patient. The patient would get sick but recover, thus acquiring immunity to the disease.

This risky method, known as “variolation,” became unnecessary after the 1790s, when Edward Jenner showed that comparable levels of immunity could be achieved by dosing patients with cowpox, a close relative of smallpox. Private manufacturers in England and the U.S. soon began making small quantities of the vaccine from the lymph of infected cows.

Smallpox, which was arguably the most terrifying, gruesome disease in human history, led many skeptics to try vaccination. That willingness, combined with the growing availability of vaccines and laws making vaccination compulsory, particularly for children, made smallpox a distant, unpleasant memory for most Americans by the 1850s.

But as in our own time, fading memories of a terrifying disease gave rise to a false sense of security.

The parallels are eerie. Many of these earlier anti-vaxxers were affluent and well-educated and fond of progressive causes. As the historian Michael Willrich has observed, they “tended to throw themselves into other maligned causes of their era, including anti-imperialism, women’s rights, antivivisection, vegetarianism.”

Many more also subscribed to what Willrich has described as a “libertarian radicalism,” and sought to protect civil liberties in the face of the growing power of the state. Sen. Rand Paul, R-Ky., who attacked vaccines Monday, would have no trouble recognizing this wing of the movement.

These skeptics found a leader: William Tebb, a British reformer, activist and gadfly who was well known for leading a high-profile fight against compulsory vaccination laws in Britain. He arrived in New York City in 1879, and helped spur the formation of the Anti-Vaccination Society of America, which soon became a formidable political force, along with other similar societies.

The early anti-vaxxers deployed a wide range of arguments to press their case. Tebb claimed, all evidence to the contrary, that 80 percent of smallpox cases affected people who had been vaccinated. He also alleged, facts notwithstanding, that 25,000 children were “slaughtered” each year in Britain as a consequence of compulsory vaccination programs.

The anti-vaxxers’ arguments resonated because they tapped into understandable anxieties. The rise of so-called vaccine farms, where unregulated producers harvested lymphatic fluid from resident cows, did little to allay people’s fears.

Indeed, while companies such as the “New England Vaccine Company” claimed to produce vaccines “entirely free from any trace of pus, debris, or epidermis,” lab tests showed otherwise.

Such revelations raised fears that vaccines could end up causing harm. But it wasn’t autism that worried people then. Rather, as the anti-vaccinationist Dr. J. F. Banton warned, vaccination could introduce a “bioplasm” into the bloodstream, “carrying with it all the vices, passions and diseases of the cow.”

The anti-vaccination forces believed that diseases found in cattle and other livestock — tuberculosis and above all, syphilis — would make the jump to humans.

This was largely baseless. Nonetheless, immunization rates declined. In 1886, the Medical News worried that the trend “portends evil in the near future” — a smallpox epidemic. These predictions came true between 1898 and 1904, when smallpox waxed and waned in the nation’s big cities, with New York among the hardest hit.

The epidemic brought the simmering dispute between anti-vaccinationists and their foes to a new level. In response to the outbreaks, public health officials used heavy-handed tactics that fell disproportionately on immigrants and minorities, whom they rounded up and vaccinated against their will. As a result, the battle over vaccines became entangled in a debate over civil liberties.

This was understandable. Whatever the risk of smallpox, the patchy oversight of vaccine production posed its own perils. After a batch of vaccine contaminated with tetanus left nine children dead of “lockjaw,” Congress passed the Biologics Control Act of 1902, which empowered the government’s “Hygienic Laboratory” to monitor the quality of vaccines.

This measure helped quell many people’s fears, and with growing oversight and education, vaccination rates went up, and many dread diseases began to disappear. In the process, the anti-vaccination movement died as well, replaced by an acceptance that vaccination was every parent’s obligation. The wildly successful campaign to largely eradicate yet another childhood scourge, polio, only cemented the consensus.

Now, the anti-vaccination movement is back, even getting a suggestion of support from New Jersey Gov. Chris Christie.

If history is any guide, it won’t last. There is nothing like the return of an ancient killer to focus attention on the real costs and benefits of vaccination. We should be thankful, perhaps, that we are only facing whooping cough and measles. Smallpox would have been far worse.

Stephen Mihm, an associate history professor at the University of Georgia, is a contributor to Bloomberg View.