I spring out of bed, pull on my shorts and trainers, slather on sunscreen, and sit down at my computer. It's 7 a.m. on a Sunday morning in mid-May, two weeks before the start of my first marathon, and time for my final big test.

On the screen, an empty road disappears into a blue sky dotted with drifting clouds, rendered in simple '80s-video-game graphics. With a sigh, I empty my mind and click a blue button marked "start," bracing myself for the drudgery ahead. Shapes begin flashing, sometimes to the left of the road and sometimes to the right. When it's a triangle, I hit a button corresponding to its position on the screen, and I do it as quickly as possible, usually within a few hundred milliseconds. When it's a circle, I do nothing. If I fail to respond within two seconds or I respond incorrectly, the screen flashes red and the computer emits an angry buzz.

And that's it. For the next 60 minutes, my sole task is to keep my brain locked on this excruciatingly dull parade of shapes. They flash by rapidly, leaving no time to daydream, check the clock, or even glance out the window. Still, thoughts intrude. I wonder how hot it is outside, whether I should have started earlier...BZZZ. The screen turns red. The longer I continue, the more frequent my mistakes become. When the hour is finally up, I have that cotton-headed feeling of total mental exhaustion that's usually the cue to flop down in front of the TV for a few hours of mindless reruns. Instead, I down a glass of water, step outside, and start running.

I lope through two miles, then gradually squeeze the pace down. I have a 15-mile progression run planned, with the last six at marathon pace. My legs feel fine, but the pace feels tougher than it should, and I have to concentrate hard to sustain it. Once again, I force my brain to zero in on yet another monotonous task: keeping my legs moving and hitting my goal splits. As far as my brain is concerned, the effort feels more like the last 15 miles of a marathon than the first 15.

Which is exactly what I'm aiming for.

There's been a revolution in running science in the last few years. For a century, researchers have focused on the role of the heart, legs, and lungs to explain the limits of human endurance, but they've ignored the brain. Turns out, that was a mistake. It's not lactate levels in your blood or oxygen shortages in your muscles that force you to slow down, it's how your brain interprets those signals. In other words, the effort of running is only as hard as your brain perceives it to be. Scientists have since demonstrated that seemingly absolute physical limits are imposed by the brain—not the body.

But knowing it's your brain that hits the brakes doesn't help if you can't overrule it. So a few researchers scattered around the globe have begun testing methods of harnessing the brain's power: zapping it with electric current, modifying the activity of certain brain regions, or simply training the brain—much like runners train their bodies—to become more fatigue-resistant, so you feel less effort while running at the same pace. This research is still in its infancy, and the outcome is far from clear. But like most runners, I'll try anything for a PR—so I volunteered to be a guinea pig in the brave new era of brain training.

My interest in the role my brain plays in my running goes way back. In 1996, I was a 20-year-old student struggling to break 4:00 for 1500 meters. I'd been running times between 4:00 and 4:02 for three straight years, and seemed to have hit my limit, when I had a breakthrough at an indoor meet in a French-speaking part of Canada. As the timekeeper rushed to translate from French to English, the splits he called out every 200 meters were off by a few seconds. Energized by the notion that I was running faster than ever, I flew to the finish in 3:52, a massive nine-second personal best. What happened next was even stranger: I ran 3:49 and then 3:44 in consecutive races. Whatever had been holding me back had suddenly disappeared—I suspected part of that barrier had been in my head.

That same year, unbeknownst to me, South African physiologist Tim Noakes gave a controversial speech in Cincinnati to members of the American College of Sports Medicine, in which he argued that some of the most cherished pillars of exercise physiology were badly flawed. Noakes himself had introduced thousands of runners—including me—to the concepts behind those pillars, like VO2 max and lactate threshold, with his bestseller The Lore of Running. He'd come to believe that something crucial was missing. The scientific understanding of endurance, as he later put it, was "brainless."

Consider this: If I put a brick on my car's gas pedal and point it down some empty desert highway, the car will keep going until it runs out of gas, blows a tire, or boils its radiator dry. For most of the 20th century, physiologists figured that marathoners operate on similar principles: You go until your muscles run out of glycogen or your legs fail or you get too dehydrated to continue—and then you sputter to a halt. But in the real world, very few marathoners actually reach that breakdown point. Sure, you're tired when you reach the finish line, but you can still hobble to the bagel table. That's because there's a driver in the car, monitoring the warning lights, adjusting pace, and controlling all the components. Noakes's argument was that marathoners have brains, and use them constantly to make sure the body never comes to a dead stop.

It wasn't until I was working as a journalist a decade later that I encountered Noakes's brain-centered view of endurance and the various competing theories it had inspired. I began to notice a series of curious studies pointing to the role of the brain in performance. One showed that cyclists slow down right from the start in hot conditions, long before their bodies have a chance to heat up. Another showed that rigging a thermometer to read falsely low room temperatures allows you to go faster. And others found that given incorrect time or distance feedback, people can go faster.

These results may have shocked scientists, but as a runner I didn't find them surprising at all. I'd seen how a change in my perception of pace had allowed me to run faster than ever in the 1500. And subsequently, I'd experienced how my brain could hold me back when I moved up to longer distances: In 5000-meter events, I always slowed dramatically in the fourth kilometer, when it felt like I was pushing as hard as I could, only to discover that I had plenty of energy left for a furious sprint over the final lap or two. In 10-Ks and half-marathons, it was even worse: I couldn't sustain the focus needed to keep my pace steady during the second half of the race. Yet I could always rally for a strong finish, which convinced me that the problem wasn't that I was out of energy or hitting insurmountable physical limits—it was in my head.

I wanted to attack my mental weak point, but none of the brain studies I'd read offered any clues on how to address it. Then in August 2011, I went to a scientific conference at Charles Sturt University in Bathurst, Australia, where I met Samuele Marcora, a voluble Italian researcher with an untucked shirt and a thick coat of seemingly permanent stubble. Marcora believes performance in endurance activities depends primarily on perceived effort. In 2009, he published a study that showed that mental fatigue can negatively affect physical performance—subjects spent 90 minutes either passively watching a documentary about trains or sitting in front of a computer performing a "cognitively challenging task" of responding repeatedly to a sequence of letters. Both groups then immediately completed a cycling test. Compared with the film watchers, participants in the task group found the exercise felt harder and reached exhaustion 15 percent earlier. "If you have a long day at work and then go exercise, you won't perform as well," Marcora noted. By measuring it experimentally, he showed that "the negative effect of prolonged mental work on physical performance is as large as the effect of muscle fatigue on physical performance—nobody knew this before."

According to Marcora, anything that moves the effort "dial" in your head up or down affects how far or fast you can run. All the usual physical signals—dehydration, tired muscles, a pounding heart—contribute to how hard an effort feels. Runners train their bodies to adapt to those signals, and over time the effort of running at a given pace gets lower. But less-obvious signals, like mental fatigue, also contribute to how hard your run feels—and trying to hold marathon pace for hours and hours is pretty taxing on the brain. This, Marcora told the conference, leads to a radical idea: If you could train the brain to become more accustomed to mental fatigue, then—just like the body—it would adapt and the task of staying on pace would feel easier. "I have an eye for things that at a superficial level seem crazy," he said. "If I tell somebody, okay, I'm going to improve your endurance performance by making you sit in front of a computer and do things on a keyboard, you will think I'm nuts. But if something can fatigue you, and you repeat it over time systematically, you'll adapt and get better at the task. That's the basis of physical training. So my reasoning is simple: We should be able to get the same effect by using mental fatigue."

I cornered Marcora during a break after his talk to find out more. He was designing a study to test whether "brain endurance training"—weeks of doing mentally fatiguing computer tasks—could, without any change in physical training, make people faster. I pestered him for details and asked if I could try it. He patiently answered my questions, then added a warning. "People who have done these mental fatigue studies—it's not nice," he said. "It's really bad. They hate you at the end of the task."

On my first day at Marcora's lab on the University of Kent's campus in the British seaside town of Chatham, I threw up in the bushes. Twice.

In exploring the difference between the "brainless" view of endurance and the new theories, I'd asked to try an effort-based VO2 max test. Traditionally, VO2 max tests—which use increasing rates of speed or resistance to measure how much oxygen you're consuming—are "brainless"; in other words, the subject makes no decisions during the test, but simply responds to increasing speeds on a treadmill for set periods of time (usually two minutes) until he can't go any faster. The only decision he makes is when to give up. The tests have long been held as the gold standard in determining one's physical limit. In the effort-based protocol, I would control the speed to maintain target levels of perceived effort, concluding with two minutes all-out. Just like in a race, I would be monitoring how I felt and making decisions at every instant about how much to speed up or slow down. Marcora's colleague Alexis Mauger had used the test in a recent, controversial study and found that subjects were able to reach higher oxygen consumption levels with this new version compared with the old standby—an impossible paradox if you believe that VO2 max represents the physical ceiling.

I wanted to see how this effort-based protocol felt compared with the traditional tests I'd done in the past. Mauger, dressed in jeans and flip-flops, fitted a mask over my mouth and tied me into a safety harness dangling from the roof. "Just in case," he said. "That last stage can be pretty tough." As the test proceeded, I had to zero in on my perceived effort—the mental "dial" that Marcora believes ultimately controls performance—matching the speed to successive points on a 16-point effort scale. When I maxed out for the final stage, I had to fight the urge to stop and instead gradually decrease the speed just enough to maintain the feeling of max effort but avoid being thrown off the back of the treadmill. Running the edge of that red line was, quite literally, gut-churningly hard—fortunately I made it to the parking lot before tossing my cookies. (While the best comparison would have been to go do a traditional test and compare my scores, I didn't have time or access. Suffice it to say, in all my previous attempts with the traditional test, I had never run so hard that I yakked.) My VO2 max score of 81 milliliters per kilogram per minute meant I had excellent aerobic fitness—now I needed to bring my brain up to scratch.
I hoped my stint in the lab the next day would be easier, at least physically. The room where Marcora and his post-doctoral research associate, Walter Staiano, do their mental fatigue studies is a carpeted classroom with a poster of Usain Bolt on the wall and an exercise bike next to a jumble of cables and wires. (In their latest studies, the pair uses EEG electrodes to measure changes in brain activity as mental fatigue increases, and they're also looking at whether pedaling while completing the on-screen tasks is more effective at inducing fatigue than the tasks alone.) Staiano affixed the electrodes to my bald pate, then I mounted the bike, balanced the keyboard on the handlebars, and stared at crosshairs on the computer screen so he could collect baseline brain activity data. Mindful of Marcora's warnings, I braced myself for a Herculean mental effort. My task: When five arrows flashed onto the road-and-sky backdrop of the screen, I was to ignore four of them and press a key indicating which direction the middle arrow was pointing. I did a double-take as I read the instructions.

"That's it?" I asked.

"That's it," Staiano replied. "You can start whenever you're ready."

The task was laughably easy—at first. And as the seconds dragged by and arrows kept flashing, it didn't get any harder. But I soon developed a very strong desire to do something else. Anything else. My mind wandered: I started thinking about the questions I wanted to ask Marcora, and whether I'd have time to go back to my hotel before lunch. Suddenly a buzzer sounded and the screen flashed red: I'd pressed the wrong button. Chastened, I refocused on the screen.

After a while, I figured I must have done enough of that particular task, so I suggested that we move on to the next one. I asked Staiano how long I'd lasted.

"Five minutes," Staiano grinned. "In the mental fatigue studies, they do 90."

This is why Marcora's subjects hate him. I couldn't fathom staring at that screen for that long. Staiano put me through a couple more training tasks: one with triangles and circles, and another where I was shown sequences of four letters and had to press one button if the first letter was A and the last letter was X, and another button if not. I lasted a few minutes on each. It would take time to build my tolerance; if all went according to plan, by the time I could tolerate 90 minutes of triangles, letters, and arrows, I'd be ready to run my first marathon—without any midrace lapses in focus.

At age 37, and after two decades of running, I figured it was time to tackle the big one. Marcora's brain training then, for me, wasn't just a novelty: I figured it would help prepare me to compete in, rather than just complete, my first 26.2.

In addition to speedwork, tempos, and long runs, I added five days a week of cognitive sessions, starting 12 weeks before race day. I had three cognitive tasks to do—the arrows, the shapes, and the A—X test—so I started with sessions of five minutes each, figuring the variety would make it easier to withstand the boredom. But when I e-mailed Marcora to double-check this approach, he had bad news: "Being boring is an important cognitive/affective characteristic for inducing mental fatigue and, therefore, a brain-training effect," he replied. "Just do a longer session of one test at a time." Ugh.

According to Marcora's hypothesis, the longer you focus on a monotonous task—clicking buttons in response to shapes, say, or running at marathon pace—the more levels of a neurotransmitter called adenosine build up in your brain. This is the same neurotransmitter that builds up when you're deprived of sleep, and it's associated with the all-too-familiar feeling of mental fatigue. Caffeine blocks adenosine, which is why it's both a powerful morning pick-me-up and a performance booster when taken before long races. Marcora's plan called for me to trigger this flood of adenosine day after day so that my neurons and synapses would (hopefully) adapt over time to keep adenosine levels lower. The payoff: The brain's contribution to my overall feeling of effort as the race progressed would stay lower, allowing me to run a little faster at the same effort.

At least, that's the theory. When I talked to other researchers, their responses ranged from mild curiosity to outright skepticism about the idea that I could train my brain to resist fatigue. That's not surprising: Among exercise physiologists, it's hard to find two who agree about anything related to the brain's role in performance, let alone what's happening with the neurons. Some have their own ideas about how to boost performance via the brain, for example by zapping a specific region of the brain with electric current right before a race. But Marcora's approach resonated with me: As a runner, I was used to putting in long hours of hard work in exchange for gradual improvements in my aerobic fitness. If logging hours in front of a computer screen might do the same for my brain's fitness, I was willing to give it a try.

After a few weeks, I'd progressed to 30-minute brain sessions. Sometimes, following Marcora's advice, I ran immediately after to practice running while mentally fatigued. The result was familiar: It felt like heading out for a run immediately after a stressful day of work or travel. It wasn't so much that I couldn't run faster—it just felt harder than usual. I'd check my pace partway through a run, realize that I needed to speed up, but be unable to summon the willpower to make it happen. The purpose of these combo sessions was to simulate the point in a race when your brain starts to feel fried, and practice pushing through it. Essentially, they were brain-training sessions, minus the shapes and letters.

Ten weeks before the race, I tested my fitness in a half-marathon. I was satisfied with my time of 1:15, but not with the distribution of my effort: My first and last 5-Ks were the fastest, while the middle segments, once again, were the slowest—a failure of concentration. I scheduled my next test race four weeks later and in the meantime, pushed my computer sessions to 60 then 80 minutes. In that next half, I went just under 1:13. My splits revealed good news: I'd kept pushing hard through the middle and finished with nothing in the tank. Maybe, just maybe, the mental training was working.

I reached the halfway point in the Ottawa Marathon in 1:18:25, on pace for a 2:37 finish (a challenging but sensible target, given my half-marathon prediction times). My breathing was smooth, my legs felt good, and my mind was attuned to my pace. I knew the miles to come would be tougher, but I had a few tricks planned to give me a boost.

In addition to besieging it with triangles, letters, and arrows, there were other, more subtle ways I could influence how my brain interpreted the effort of maintaining 6:00-per-mile pace—like swishing sports drink. Sloshing it around your mouth sends signals to your brain that more fuel is on the way, which in turn decreases your sense of effort. Surprisingly, this effect can be even greater than swallowing the liquid, since swishing it prolongs contact with the sensors in your mouth. Facial expression is also linked to effort: Marcora has used electrodes to monitor the activity of facial muscles during exercise, and found the harder you work, the bigger your "race face" grimace. He's now running experiments to test if the reverse is true: that learning to frown less might make the effort feel easier.

I rounded a corner and spotted my friend Shannon holding a giant yellow sign that read: Remember when I brought you Burmese food and then ate it? She'd once made an epic 10-hour drive back to Ottawa with an order of my favorite dish from my favorite restaurant on ice as a surprise, and then, after a friend mistakenly told her that I was out of town, slurped down the last bite just as I returned her call. Her husband, Geoff, stood beside her with an equally enormous sign that read simply, She's sorry! I spat out a mouthful of Powerade in a graceful electric-blue arc and broke into a grin.

Soon, I was steadily passing other runners. My pace was rock-steady and my concentration never wavered as I nailed each split to within seconds. My confidence was soaring by the time I hit 30-K in 1:51:35, a few ticks under 2:37 pace.

There was just one discordant note: My quads were starting to feel sore. Most of my training had been on dirt trails, and my legs weren't used to pounding on flat asphalt roads. My wife, mother, and father were stationed at intervals along the second half of the course, with instructions to make me smile. Each time I spotted one of them holding a sign or wearing a silly hat while screaming encouragement, I had more and more difficulty twisting my facial muscles in a smile. I thought back to something Marcora had told me about the difference between effort and pain. We often think of races as "painful," but physical pain is distinct from the sense of effort: Effort is the struggle to keep going against a mounting desire to stop, and it's what usually limits race speed. Muscle pain, the most common form of exercise-induced pain, is the aching and burning sensation felt in the active muscles when exercising at a high intensity. What I now felt in my quads was pain, an electric stabbing sensation that my hours of clicking at the computer had done nothing to prepare me for, and it was rapidly approaching intolerable. I clicked a button on my watch as I passed the 35-K mark. I was still on 2:38 pace, but the wheels were about to come off.

Over the last four miles, I had the surreal sensation that the race was running backward, as people I had passed during the middle miles started to pass me back. I stopped checking splits and recalculating my finish time, because it was going to take all my mental strength to make it to the finish without walking.

When I contacted Marcora for a postrace debrief, what I most wanted to know was whether I could really blame my late-race fade on pain—rather than a weak mind. "Of course!" he said. "You had muscle pain which was so intense as to limit your performance." I slowed not because I wasn't trying hard enough, but because the prolonged pounding had damaged the muscle fibers in my legs—I could no more "run through" this pain than I could run through a broken ankle, he explained. "In most cases, exercise only induces moderate levels of muscle pain, and the limiting factor is then perception of effort." But not in all cases.

Despite having hobbled across the finish line in 2:44:48, I felt upbeat about the race. Through the long, lonely middle miles, where I'd failed so many times before, I held focus and my pace never wavered. It felt like I'd shaken that curse and so I chalked up a moral victory. But can I attribute this breakthrough to brain training? With so many uncontrolled variables, it would be impossible to draw any conclusions from my personal experiment. But about a month after my race, I received preliminary results from Marcora's first brain-training study: After six weeks of brain-endurance training, the subjects tested so far had improved their performance on a time-to-exhaustion cycling test by an average of 23 percent. (All participants maintained their regular physical training routines.)

Still, that doesn't mean future marathoners will spend their Sunday mornings clicking buttons on a keyboard. In real life, it may work better to combine mental tasks with physical activity. In fact, Marcora has already launched a study in which subjects do the cognitive tests while pedaling an exercise bike, like the setup I had used in his lab at the University of Kent. To Marcora, mental and physical effort are always intertwined—which means that every run is also an opportunity to train your brain.

Until recently, coaches and sports scientists believed runners should be as fresh as possible for workouts—well fueled and fully hydrated with rested legs. Now elite athletes sometimes do the opposite: train on empty stomachs and tired legs to stimulate the adaptations that help them cope with the rigors of racing. We're due for the same shift when it comes to the brain, Marcora believes: Fresher isn't always better. The military excels in training soldiers to function despite mental fatigue—forcing them to perform grueling marches when they're already sleep deprived, for example. But it doesn't have to be that crazy. If your brain is fried after a stressful day at work or a sleepless night with a sick kid, don't follow the usual advice and reschedule the hard workout you had planned. Instead, embrace the mental fog and hammer the run. Yes, your times will be slower than usual, and the adenosine levels in your brain will be sky-high. You will hate running, and life in general, and Sam Marcora in particular. But if, a few months later, those please-stop-now runs translate into a PR, you'll forgive him.

To watch Marcora's brain-training test in action, get this issue's enhanced iPad edition. And, for more information on this subject, visit BrainEnduranceTraining.com.