The warm evenings of summer are prime time for grilling. But this all-American ritual may also raise health risks — particularly if the grill is loaded up with hamburgers and hot dogs.

When cooked at high temperatures or over open flames, according to accumulating evidence, compounds in red and processed meats undergo biochemical reactions that produce carcinogenic compounds capable of altering the eater’s DNA. Most of the research has been conducted in lab dishes and in animals. But some emerging evidence is starting to connect the dots to human risks of cancer, too.

Lest you feel that science threatens everything you enjoy in life, experts say it’s not necessary to give up meat — or grilling — altogether. Grilled vegetables don’t harbor the same risks. There are also ways to cook meat that produce fewer carcinogens.

And while there’s not enough evidence to say how much is too much, eating grilled meat in moderation is probably fine. In other words, don’t get too freaked out by what you might find on the Internet.

“You can just Google and see all of these sensationalistic headlines that say eating bacon is like smoking a pack of cigarettes,” but it’s not the same, says Robert Turesky, a biochemical toxicologist at the University of Minnesota in Minneapolis. “I still do enjoy barbecue. I just don’t eat it as often.”

The case for meat as a cancer risk has been building for decades, with plenty of studies showing that people who report eating diets heavy in red and processed meats have higher risks of certain types of cancer, as well as heart disease and other chronic illnesses. Enough of those studies — together with lab work — have built up to make a convincing case that meat carries risks, according to a 2015 analysis by the World Health Organization’s International Agency for Research on Cancer, which considered more than 800 studies conducted around the world.

Overall, the IARC review found that the strongest evidence linked processed meats (such as hot dogs, beef jerky, bacon and ham) to colorectal cancer — with each hot-dog-size serving of processed meat eaten daily raising the risk by 18 percent over a lifetime.

More than 34,000 cancer deaths are caused around the world each year by diets high in processed meat, according to data referenced in the IARC report. By comparison, tobacco causes about a million cancer deaths annually. Alcohol consumption causes 600,000. And air pollution is responsible for 200,000.

The IARC review also found evidence for an association between unprocessed red meat (such as beef or pork) and colorectal cancer, along with some evidence that red meat might contribute to pancreatic and prostate cancers, too.

Studies show several ways that meat might cause cancer, says Loic Le Marchand, an epidemiologist at the University of Hawaii Cancer Center, who collaborated with more than 20 international scientists on the IARC report. One line of evidence points to compounds called nitrates and nitrites, which are used during processing and also form in the colon when people digest meat and meat products, even those labeled “nitrate-free.”

Cooking methods make a difference, according to studies that have zeroed in on two groups of chemicals that appear in particularly large quantities when meat, fish or poultry is cooked under high heat by grilling, barbecuing, broiling or even pan-frying. One group, called HAAs (heterocyclic aromatic amines), form during high-temperature reactions between substances in muscle tissue. PAHs (polycyclic aromatic hydrocarbons), which form when meat is smoked, charred or cooked over an open flame, are also found in tobacco smoke.

In general, Turesky says, higher temperatures and longer cooking times lead to higher levels of HAAs and PAHs. Enzymes in our bodies then change these chemicals into compounds that can damage DNA. Numerous studies have illustrated that kind of damaging potential in cell cultures and animals, including rodents and primates.

But does meat actually cause cancer in people?

Turesky is beginning to turn up evidence that it might. In a study published last year, he and colleagues studied biopsies of prostate tumors and found that DNA in the cancer cells had been damaged by HAAs.

“This is the first unequivocal proof that, once you eat the cooked meat mutagens, some of them find their way to the prostate and damage the prostate,” Turesky says. The study doesn’t prove that meat caused the cancer, he adds. “It could just be an association. Now we have to show that the mutations are attributed to the chemicals in cooked meat.”

It would be illuminating to find the same types of meat-linked mutations in colorectal cancer cells, Le Marchand adds. “That would be the nail in the coffin,” he says.

In the meantime, research suggests several ways to lower levels of carcinogens in your meat. Marinating before cooking helps keep the surface of the meat from getting so hot, Turesky says. Microwaving before barbecuing can also help. So can flipping burgers frequently and taking care not to char or burn meat (while also cooking it enough to avoid the health risks of undercooking).

Meat may also be more damaging to some people than to others, says Le Marchand, whose interest in meat began with observations that Japanese immigrants to Hawaii had higher rates of colorectal cancer compared with the state’s white residents and compared with people in Japan. Some of his research suggests that genetics puts some people more at risk from the potentially harmful effects of meat.

Eating meat once or once in a while won’t cause cancer, Le Marchand adds. It’s regular and repeated exposure for decades that adds up to make a difference in risk.

“I think once a week or twice a month is fine,” Le Marchand says. As with other nutrition concerns, he adds, “it’s always the same: Moderation is key.”