When Eliud Kipchoge ran into the history books, a huge smile was on his face as he became the first person to run a marathon in under two hours, with a time of one hour, 59 minutes and 40 seconds. Confusingly, he had been smiling kilometres from the end, long before the result was certain.

The smile was not a sign he was having a great time, rather the opposite. It was to trick his body into feeling better as he plunged further into the pain cave than ever before.

In short, sometimes you smile because your body is producing endorphins – a hormone that boosts happiness – but sometimes you produce endorphins if you smile.

“When you smile and you’re happy, you can trigger the mind to feel your legs,” Kipchoge once said.

In Canadian long-distance runner Alex Hutchinson’s book, Endure, which explores the physiology and psychology of athletes, he points to an experiment conducted in 1988. Volunteers were made to hold a pen between their teeth. Gripping the pen involved the same muscles used to smile. Those with the pen in their mouth reported finding a cartoon funnier than those who did not. The idea became known as “facial feedback”, when emotions can be amplified by the physical response.

The same seems to be true in sport – weightlifters reported higher levels of perceived effort if they grimaced instead of having a relaxed face.

But it’s not just your own smile. Hutchinson writes about an experiment where volunteers pedalled on stationary bikes to exhaustion. A screen in front of the athletes flashed images of faces in 16-millisecond bursts. Those who were shown sad faces reached their maximum effort an average of three minutes earlier, and reported higher levels of effort, than those who were shown happy faces, even if they were only seeing them subconsciously.

Hong Kong ultra running stalwart John Ellis, who has run and won countless ultra-marathons and never had a DNF (Did Not Finish) in a sport that prides itself on pain endurance, employs the same tactic.

How John Ellis runs through mountains of pain at Nine Dragons

In the short film Is This Fun? about his victory on the 9 Dragons Ultra, he said: “When things are tough you should just force yourself to smile. And it just sounds really dumb. You force that smile, but it’s amazing what that does.”

On The Adventure Trail podcast, Ellis was asked if he knew about all the smile-related studies. He didn’t. It seems he worked out what scientists had been puzzling over since the 1980s.

So next time you take on a physical challenge, smile like you mean it. And surround yourself with smiling teammates or support groups too. It might be the difference between finishing, dropping out or setting your personal best.