Brent Cook, 32, of Newton, N.C., feeds one of his pigs at the Montgomery County Agricultural Fair on Aug. 18. (Michael Laris/The Washington Post)

Three massive hogs were spooning in a pen near the Swine Show Pavilion. Two others lounged with a bit more personal space. As pink ears and tiny tails flopped, Katie Sayer was thinking about taking one home, not getting sick.

“We’re having a good time, and I’m not going to stop going around and looking at animals and pigs because I might get the swine flu. That’s what doctors are for,” said her boyfriend, Scott Salsbury, 27, who made his first trip to the Montgomery County Agricultural Fair on its final day Saturday.

Maryland public health officials announced Friday that five children and one adult in Queen Anne’s County, across the Chesapeake Bay, contracted swine flu after having direct contact with pigs. None were hospitalized or are seriously ill. All handled pigs at the Queen Anne’s County Fair, and they also encountered the animals in other agricultural settings. No cases have been reported in Virginia and the District.

“It’s more like direct handling of pigs, as opposed to just a casual touch of a pig on one occasion,” said David Blythe, a medical epidemiologist with the Maryland Department of Health and Mental Hygiene. During the fair, Montgomery veterinarians were doing regular checkups of the pigs.

Sick pigs sneeze, cough and “bark,” and health officials said people at higher risk of complications from influenza — such as those with compromised immune systems, pregnant women, children younger than 5 and the elderly — should take extra precautions.

“We would recommend those people avoid having contact with sick pigs if they can,” Blythe said. The virus rarely transmits from human to human. “The basic message is to try to take precautions when around sick pigs. The precautions are similar to when you’re around sick people.”

And so a pig-loving vegetarian from Annandale named Abby Page, 12, happily watched as a piglet named Hammy Hamlin (named after Virginia-raised NASCAR driver Denny Hamlin) raced to victory around a small track lined with screaming children. At age 5, she wrote “I love piggies” in her diary, and has not looked back. She reads books on pigs, owns a T-shirt that reads “Eat your greens, not your pork and beans,” and calls pigs caring not filthy.

“It’s just another normal disease,” Page said of the H3N2v flu strain. “Most of the time, diseases like that won’t hurt you.”

Maryland officials said that since July eight people have been hospitalized nationwide, but none has died.

Brian Zikmund-Fisher, an assistant professor at the University of Michigan School of Public Health, studies how people communicate about risk and how they make decisions about their health.

“One of the things we know from the research is, our fear of risk is related to how much we think we can control that risk,” Zikmund-Fisher said. The vast majority of Maryland’s 5.8 million residents have not been spending time with pigs at a fair or farm, so “it’s not something they have to personally worry about,” he said.

For those who have been hanging with pigs, “if you’re not feeling sick, don’t worry,” Zikmund-Fisher said. If you are, tell your doctor so they can better manage your illness.

A more complex calculus goes into balancing preparation for and fear of another annual virus: West Nile.

Officials in Virginia said the first two West Nile cases were confirmed this week. Maryland has had five cases, and the District one, health officials said. Deaths from an outbreak of the mosquito-borne illness in Texas have recently lead to aerial spraying.

“It’s not like the pig situation. You don’t know . . . who’s going to be at risk or not” of getting a bite, Zikmund-Fisher said. But with two confirmed cases in a state such as Virginia — which has 8 million residents — the risk is minuscule.

Although it’s a relatively minor illness for most who do get it, people know there’s a risk. “The problem is, for some people it can be serious. So you just have to treat it as something where good preventative behavior is what we ought to be doing,” he said.

At the Montgomery fair, Stephanie Cook, 30, and her husband, Brent, 32, of Newton, N.C., run the pig races as part of a family company called Hogway Speedway.

Stephanie Cook recently married into this work. Although she is pregnant, and has had a little cough, she loves spending time with the animals. “They learn you,” she said. One white pig doesn’t walk up the ramp because it knows she’ll lean over every time and pick it up, she said.

The last time he visited, Devon Callender, 30, an artist visiting from New York, rushed out of the barn shortly after seeing the massive creatures, which can weigh 270 pounds. He was planning to step in again this time and get out fast.

“It wasn’t that I thought I was going to catch a sickness,” Callender said. “Being from the city, I think animals can attack you.”