It is Sports and Fitness Day at the White House.

That meant President Trump — a man who has spoken out on the dangers of exercising and devours McDonald’s, KFC chicken, chocolate cake and double scoops of vanilla ice cream — spent his afternoon lecturing the nation on the importance of staying fit.

The fitness event Wednesday afternoon on the White House lawn focused on how much children benefit from team sports and featured activities including flag football, baseball, golf, volleyball, soccer and track and field. For the most part, Trump avoided all of the above at the event, looking on in his suit and tie while others took part. But at one point, he appeared to step into a baseball batting cage and take a swing.

The fleeting moment caught on camera was one of the rare occasions during Trump's presidency — outside of his leisurely golf outings — where there was photographic evidence of him engaging in exercise.

Trump is perhaps the most sedentary, least healthy president in recent history.

His dietary and exercise habits have alarmed some health experts and spurred unflattering comparisons with past occupiers of the Oval Office.

Barack Obama played basketball. George W. Bush went mountain biking and cleared brush on his ranch. Even Bill Clinton would try to make up for his fondness for fast food with the occasional jog to McDonald's.

Trump, by comparison, does not simply avoid exercise — he has espoused theories about how it can be hazardous to one’s health.

“All my friends who work out all the time, they're going for knee replacements, hip replacements — they're a disaster,” he told New York Times in 2015, saying he gets his fill of exercise standing in front of crowds at campaign events.

In high school, Trump played football, baseball and soccer. In a January interview with the Wall Street Journal, he boasted: “I was always the best athlete. People don’t know that.”

But he gave up his athletic pursuits after college. In The Washington Post’s biography of Trump, “Trump Revealed,” reporters traced his turn away from sports and exercise to an odd theory he developed about how a person’s body could be depleted of energy, like a battery, by exercise. When Trump, for example, learned one of his top casino executives, John O'Donnell, was training for an Ironman triathlon, he warned him, “You are going to die young because of this.”

In January, Trump’s White House physician told reporters the president acknowledged he could stand to lose a few pounds by exercising and eating better.

As far as Wednesday's fitness event goes, “I think it’s just wonderful that the president has suddenly become interested in physical health,” said Marion Nestle, a nutrition and public health professor at New York University. “Presidents have huge influence on American health. … He is not someone who has, in any visible way before, shown interest in promoting health, so it’s hard to say without irony, but if he’s speaking up about health today, I’m totally for it.”

Even now, 16 months into his presidency, much of Trump’s personal health remains shrouded in mystery.

His longtime personal doctor, Harold Bronstein, said recently that Trump representatives conducted a “raid” on his office and spirited away Trump’s medical files.

Trump is the oldest person to be elected president and has repeatedly attacked opponents as being “low energy” and lacking “stamina.” Even when he golfs, Trump eschews walking, preferring to take a golf cart, even driving onto greens, which is normally frowned upon. During a Group of Seven summit in Sicily, rather than walk 700 yards up a small hill for a photo op, Trump followed behind other leaders in his signature golf cart.

In January, then-White House physician Ronny L. Jackson, who left that job amid scandal, issued a clean bill of health for the president that was so over-the-top in its superlatives that it was questioned by many medical experts.

The height and weight Jackson listed from that physical have become the target of several Internet memes. The physician's description of Trump's height of 6 feet, 3 inches and weight of 239 pounds make Trump overweight but just a hair under the official designation of obese.

In a recent book, Trump’s former top campaign managers said he had “four major food groups during the campaign: McDonald’s, Kentucky Fried Chicken, pizza, and Diet Coke.”

After the January physical, the White House physician told reporters he planned to arrange for a dietitian and low-impact, aerobic exercise program so Trump could lose 10 to 15 pounds this year.

When asked about that new exercise regimen and planned weight loss Tuesday, Ivanka Trump, who was hosting a briefing on the coming fitness event, abruptly left the call.

“Ivanka had to step out for another meeting,” press aide Ninio Fetalvo told reporters.

Some in Trump's orbit say they have started noticing small changes in his eating habits.

Trump's lawyer Rudolph W. Giuliani told The Washington Post that at a meeting this month over lunch, he noticed Trump eating one of his usuals — a well-done burger — but with a twist. The burger, Giuliani noted, had only half a bun.

“I do that, too, sometimes,” Giuliani said about the half-bun. “It’s a good way to do it.”

Others who dine regularly at the White House told CNN they have noticed Trump these days often eating fish — Dover sole — instead of his go-to favorite of well-done steak slathered in ketchup.

Trump, however, has been less active when it comes to publicly supporting a healthy diet. Just as he tried to dismantle many of his predecessor’s other signature programs — the Iran deal, Obamacare, the Paris climate treaty — Trump has gone after Obama's attempts to get Americans to eat more healthfully.

Under Barack and Michelle Obama, the White House launched a “Let’s Move” campaign to teach children to eat better and get fit, an effort to combat the increase in child obesity. Trump issued an executive order in February overhauling the initiative to abandon the previous administration’s focus on better eating and fitness and replacing it with an effort to get children to join team sports. Trump even changed the name slightly to Council on Sports, Fitness and Nutrition, putting “sports” ahead of “fitness.”

In the phone briefing ahead of Wednesday’s event, White House officials said Trump wants to get more children participating in sports and to make it more accessible to poor students.

“We must break down barriers to youth sports participation and empower each child to reach his or her full potential through sport and play,” Ivanka Trump said.

At Wednesday's event, Trump talked about the athletic "winners" serving on his council. "Does winning get boring to you?" he asked former Yankees relief pitcher Mariano Rivera. He talked about how sports help children “reach their potential" and “valuable life lessons learned on the field of competition."

Nestle, the NYU public health expert, questioned the Trump White House’s dismantling of the previous work on nutrition.

“You need both diet and exercise to be healthy. And especially when it comes to childhood obesity, diet is much more important than exercise. You need both,” she said.

Correction: A previous version of this story incorrectly stated who Harold Bronstein said raided his office. He said they were Trump's bodyguard, a Trump Organization lawyer and a third man, not federal officials.