Have you heard? The GOP is declaring war on science again.

In February, a government-appointed nutrition advisory panel said Americans should eat less sugar and red meat. It also suggested that environmental considerations should factor into a healthy diet, which livestock producers understood as an attack on their industry.

Republicans in Congress think the guideline process is out of control and are now trying to rein in the panel. By their lights, nutrition scientists should concern themselves with nutrition — not sustainability. Critics say they’re pandering to special interests.

The funny thing is: Both sides may be right.

For decades, the government has advised Americans on what they should eat. The advice isn’t just advisory; it drives everything from school lunches and agricultural subsidies to marketing for those bowls of candy we call breakfast cereal. But the science behind this enterprise has always been shaky.

In “Good Calories, Bad Calories,” Gary Taubes chronicled how the federal government went all-in for a low-fat, high-carbohydrate food pyramid. The man most responsible, nutritionist and epidemiologist Ancel Keys, was convinced that America’s fat-rich diet explained the rise in heart disease in the U.S.

It was a plausible theory, but there was scarce evidence it was true. In 1957, the American Heart Association concluded that the correlation between fat and heart disease “does not stand up to critical examination.”

Three years later, the AHA reversed course, without any new evidence. Keys had simply taken over the relevant committee and asserted that “the best scientific evidence” was on his side.

Armed with a government grant, Keys went off to prove what he already believed. He launched the Seven Countries Study, comparing the diets of populations he cherry-picked. The study — surprise! — confirmed Keys’ thesis. Left unmentioned: Keys had data from 22 countries, and his correlations vanished in that sample.

No matter, the War on Fat had begun. Soon the federal bureaucracy joined the fight, and kids were drinking that blue sugar water we call skim milk. Everyone had good intentions, but special interests protected their investments and experts protected their reputations. In 1984, the National Institutes of Health convened a “Consensus Conference.” Participants had to already be in agreement. No wonder they issued a consensus document that was then used to stifle debate.

In 1988, the surgeon general issued a report declaring ice cream to be a “comparable” public health threat to cigarettes. The science was settled.

Except it wasn’t. If you’ve been paying any attention, you’ve seen the stories about how fat isn’t necessarily bad for you, while carbs are the real enemy. Studies have found that more milk fat in your diet correlates with less heart disease. Who’s right? I lost nearly 50 pounds in part by cutting out carbs. That’s clear enough for me, but it’s also clear there’s a lot we don’t yet understand.

Given this history, you can see why Republicans in Congress are skeptical of the whole nutrition guidelines process and want to make sure the government’s scientific advice is actually scientific, not the reflection of some interest group. Environmentalists, to the GOP, aren’t politically pure — they want to advance their agenda just like everyone else.

On the other hand, you can see why critics think the GOP is politicizing rather than de-politicizing the process. It looks to them as though the GOP is simply doing the meat industry’s bidding.

Regardless, Congress is right to revisit the guidelines and how they’re produced.

“There’s a lot of stuff in the guidelines that was right 40 years ago but that science has disproved. … Sometimes the scientific community doesn’t like to backtrack,” David McCarron, the incoming chairman of the Medical Nutrition Council at the American Society of Nutrition, told the Washington Post.

There’s no shortage of lessons here, well beyond this food fight. Even when everyone’s intentions are good, politics can get in the way of science. Scientists are not immune to fads and groupthink just because they claim to speak for science. Special interests work the refs, but the refs often have an agenda as well. Winners of policy fights hate to lose — or admit they’re wrong.

And people who shout about a settled consensus are often only shouting to drown out those who might disagree.