It was showtime at the youth swine exhibition, and the pig barn was bustling. The competitors, ages 3 to 21, were practicing their walks for the show ring and brushing pig bristles into place. Parents were braiding children's hair, adding ribbons and pig-shaped barrettes. Dr. Andrew Bowman, a molecular epidemiologist at Ohio State University, was striding through the barn in waterproof green overalls, searching for swine snot. He soon spotted an appealing subject: a pig sticking its nose out from between the bars of its enclosure. "We have a total bias for snouts out," he said. Later, back in the lab, Bowman and his colleagues would discover that several of the snouts snuffling around this busy barn in New Lexington, Ohio, were harboring influenza.

The world is emerging from a pandemic that killed at least 6.9 million people. It won't be the last. Outbreaks of zoonotic diseases, which can spread between animals and humans, have become more frequent in recent decades, and animal pathogens will continue spilling over into human populations in the years ahead. To Americans, spillover might seem like a distant problem, a danger that dwells in places like the live animal market in Wuhan, China, that may have been the origin of the COVID-19 pandemic.

"I think there's this real feeling here in the U.S. that disease is something that comes from elsewhere," said Ann Linder, an associate director at the animal law and policy program at Harvard Law School.

But there is risk in our own backyards — and barnyards. Since 2011, there have been more confirmed human cases of swine flu in the United States than anywhere else in the world. (That may be because other nations are doing less testing and surveillance, and many cases here and abroad are likely to go undetected, experts say.) Most have been linked to agricultural shows and fairs. "They have become kind of hot spots," Linder said.

Although flu is often mild in pigs, the animals are renowned for giving rise to novel flu variants. In 2009, one of these new variants, which originated in pigs in Mexico, set off a pandemic that killed at least 150,000 people, according to estimates from the Centers for Disease Control and Prevention.

"Lots of folks say, 'Well, it's just flu, what's the big deal?' " Bowman said. "If it's the next pandemic, then it's really bad."

For more than a decade, Bowman and his colleagues have been documenting the dangers and seeking ways to make swine shows safer. Meaningfully reducing the risks will require looking past the pigs to creatures on the other side of the spillover equation. What needs to change, Bowman said, "is an awful lot of human behavior."

Pigs play a key role in the evolution of influenza. They can be infected by swine, bird and human flu viruses simultaneously, serving as mixing vessels in which different strains can reshuffle their genetic material, yielding new versions of the virus.

When the 2009 swine flu pandemic hit, influenza surveillance in pigs was limited, said Bowman, who was then a practicing veterinarian. But the outbreak was eye-opening, and Bowman, who attended veterinary school at Ohio State, returned to the university to work with one of his former professors on a swine surveillance project.

They began swabbing pigs at swine shows, ultimately uncovering a national network of events that resulted in human infections in a predictable annual cycle.

Starting every spring, regional and national "jackpot" shows, which attract serious swine competitors, bring together pigs from far-flung farms, causing new flu variants to spread across the country.

In the summer and fall, a much larger number of children bring their pigs to county or state fairs. At about 25% of fairs, at least one pig tests positive for the flu, which tends to spread widely, the researchers found. "By the end of the fair," Bowman said, "you have 200 pigs shedding influenza virus."

Fairs also put large crowds of people in close contact with pigs. "There's children petting and touching the pigs and, at the same time, eating cotton candy and hot dogs and finger food," Linder said.

Spillover is not a rare event. In 2012, a major swine flu outbreak caused more than 300 confirmed human cases; Bowman and his colleagues found evidence that the virus had jumped from pigs to people during at least seven different Ohio fairs. "The idea that we're seeing it right in front of us, multiple times — it was very surprising," Bowman said.

Over the years that followed, the researchers worked to identify what made these shows risky. They found that although most fairs had hand sanitation stations, few had signs explaining how to use them — and almost no one did.

The Minnesota State Fair, which starts this month, has many protocols in place to prevent the spread of illness, according to Jill Nathe, the fair's deputy general manager of agriculture, competition and education. These include many hand-washing stations in livestock barns; signs instructing guests to avoid hand-to-mouth contact in the barns, including no eating, drinking, or children's pacifiers; warnings for senior citizens, children under 5, pregnant woman and people with chronic health conditions or a weak immune system to take extra care; and State Fair veterinarians evaluating and monitoring all swine for competition.

In Ohio, researchers documented risks associated with the weigh-in procedure, in which the pigs were lined up, nose to tail, and guided onto a scale one by one. During that process, many pigs pressed their noses to vertical sorting panels used to keep the animals in place, and one infected pig could contaminate the common surface. "That results in accelerated transmission," Bowman said.

The researchers, who have shared their findings with show organizers and health officials, say they have seen some changes, with many shows moving away from mandatory mass weigh-ins.

When they were not competing, many of the children at the New Lexington show wandered into the vendor barn, where artisans and organizations were hawking their wares. A booth near the entrance, where a cartoon pig in a lab coat invited children to enter the "Swientist Laboratory," did a brisk business.

When a group of three preteens approached, Jacqueline Nolting, a researcher and educator on the Ohio State team, challenged them to test their hand-washing skills. She directed them to rub a clear gel into their hands and wash them thoroughly. Then, she pulled out a black light, announcing that any lingering traces of gel would glow. Six hands lit up.

"Oh, you've got lots of germs!" she exclaimed. "In the cracks of your knuckles — can you see how it got in the cracks of your knuckles?"

The activity is a mainstay of the Swientist program, which the team began developing in 2015 to teach young exhibitors how to keep their pigs, and themselves, healthy. The researchers have become fixtures at swine shows across the country, which they attend with two objectives: to keep tabs on the virus by swabbing more pigs and to stop its spread by teaching children the basics of biosecurity.

Rob McCarley of Circle­ville, Ohio, said that the first thing his 5-year-old twins want to do at a show is see what activities the Swientist team is offering. "They look forward to it," he said. (And they seem to be paying attention; when one of the family's pigs got sick this spring, one of the twins announced that they should isolate the animal.)

The scientists shared their data with exhibitors and reassured them that they were not "just here to poke and prod and take," Bowman said. They pitched themselves as partners with shared goals.

Star Tribune staff contributed to this story.