It had been decades since I’d flown over a pair of handlebars.

One moment I was bouncing along, knee-deep in sagebrush, mind reeling from all the natural beauty zipping by, and the next I’d caught a wheel on a rock and gone sailing into that familiar somersault: butt rising from the saddle, shoulders twisting violently, hips lurching up-and-over, heels actually clicking midair, sunglasses and water bottle and half-eaten Clif Bar hurtling into the trees, the ground closing in.

Because I was aimed steeply downhill, partway into a soft-clay gully, I landed more or less on my feet, like a gymnast, before flopping onto my stomach with an “Ugh!” and briefly bodysurfing. Miraculously unscathed, I dusted myself off and glanced around. Out here, alone in the wilderness, at least nobody was watching.

Looking back, it seems strange that I kept going. I was just one-sixteenth of the way into a 96-mile-long bike-packing trip with an old friend, Dacus, whom I had abandoned an hour earlier with a broken chain. It wasn’t even my first wipeout. My shins were already pulped after crashing through a wall of thistle. Most alarmingly, I had scant cellphone reception.

But the thought of returning the way I had come — wading a murky creek and huffing up a rutted cow path choked with wood ticks — was more depressing. Besides, it had been my idea to cycle the Maah Daah Hey Trail, the longest and arguably most grueling single-track mountain biking route in the United States.

I was an unlikely candidate for the trip: I had never ridden a mountain bike before, or even camped much. But I’d read about the trail — a doorstep to the lush, vertiginous, sunstruck vastness of the North Dakota Badlands, which Theodore Roosevelt called “a place of grim beauty” — and was sold.

Dacus, a mountain-biking neophyte living in New Orleans, took some convincing. But in early June, we arrived in the striving tourist town of Medora, a jumping-off point for the trail. At Dakota Cyclery, an excellent bike shop and outfitter, we rented sturdy mountain bikes, trail maps and bike bags for carrying our gear, and booked a shuttle ride to a northern trailhead, all for a reasonable $375 apiece. With four days of food and clothing lashed to our bikes, and with the vaguest notion of what awaited us, we started pedaling.

Something I didn’t know about mountain biking, at least on a trail this challenging: You cannot look up. Even for a second. To do so is to court ruin. Forget about the scenery, all that peripheral beauty gone by in a flash, the profound silence, the bliss of seclusion. Was that a bull elk up ahead or merely a juniper? Oh, how the rings of morning light smolder over that ridgeline … Wake up! Dial it in, man! Head down! Eyes locked on the trail! Let your mind drift and you are toast.

Unfortunately for me, on the Maah Daah Hey, the temptation to look up is endless. The North Dakota Badlands are sometimes compared to the loping greenery of New Hampshire’s White Mountains — but that’s apt only if the greenery had been painted on top of Arizona-style canyon land. At its edges, the Badlands flatten into farm country, but their heart is the swaying, mixed-grass steppe of the Little Missouri National Grassland: more than a million acres of astonishingly beautiful, infernally punishing terrain. At every turn, it induces a wandering eye.

Bridging the north and south sections of Theodore Roosevelt National Park, the Maah Daah Hey is 144.7 miles all told, but Dacus and I were tackling only the first 96, departing from Bennett camp, just outside the north section.

From the very start, it was all up, up, up. With an elevation gain of 8,600 sidewinding feet, it began to feel Dantean. Everywhere were wonderful reminders of our mortality: sheer 300-foot drops into saw-toothed river bottoms; eroding hillside ledges that slid away in our wake; Yugo-size cows with a knack for materializing around blind turns; and at road crossings, careening oil trucks. Had I been in a morbid frame of mind, I might have chucked it all at Mile 3, when Dacus’ chain broke.

The plan at that point was to reconnect farther along, after Dacus had hiked back to the trailhead, called Dakota Cyclery for help, and had them drop him off around Mile 10. I rolled on, feeling abruptly, utterly alone. We’d seen no one else all morning, and our first campsite was still 22 miles away.

My prevailing concern, however, was staying on my bike. Before my acrobatic dismount, I’d narrowly missed being brained by a lolling branch. Later, I had screeched to a halt at the lip of a sharp declivity and, unable to find a foothold, simply timberrrrrrrrred into the sagebrush.

But it was a warm day, in the low 80s, with a delicious tailwind. Wildflowers crowded my wheels: blue flax and sego lily, golden pea and spiderwort. Prairie grasses of muted yellows and olives bristled under a heartbreakingly blue sky. I startled a pronghorn, a relative of the antelope, which took off, kicking up sparks of dirt; I trailed it across several hundred yards of upland meadow, until it was a bead in the distance.

I had been reading a biography of Sitting Bull, the great Lakota holy man, and knew that far to my left was a siltstone butte called Killdeer Mountain, where in the summer of 1864, the U.S. Army attacked a peaceful Indian encampment, killing around 150 Santee and Lakota Sioux, though Sitting Bull survived. As they retreated and regrouped for the Battle of the Badlands — fought later that summer at the trail’s midsection near Medora — the Sioux very likely passed not far from where I was riding.

Straddling a $2,000 state-of-the-art, carbon-fiber mountain bike, and with three liters of cold water in my insulated hydration pack, it was humbling to think of Sitting Bull, a fugitive in his own home, short on water and horses, trying to lead his people to safety over this broken ground.

Onward I slogged, from tabletop plain to forests of pinyon and juniper to gravel culvert and back again. Where the trail crossed County Road 50, the outfitter’s van appeared with Dacus grinning in a window. A doctored chain, a high-five, and we were off again.

And then, within minutes, we were lost. While mostly well marked, with signposts placed every 500 feet or so, the Maah Daah Hey can devolve into a latticework of tracks — some of them cow paths, some blazed by backcountry regulars — forking this way and that, and ebbing into ever-unpromising voids. I yanked-out the map and scanned its stupefying squiggles for a clue. Which way was north again? And then there it was, in the dirt at my feet: Some benevolent soul had scrawled an arrow with a fingertip, pointing the way ahead.

We soon crossed Beicegel Creek, where 65-million-year-old petrified cedar stumps stood in the shallows, a reminder that western North Dakota had once been subtropical wetlands, like today’s Everglades. I gazed down at fossilized abalone and nautilus shells.

Toward dusk, we found ourselves flying through an immense pasture, scattering herds of black cows and calves, the light running out behind us. It felt like a reward for a very patchy first day, perched in our pedals and roaring across the beautiful emptiness, tilted slightly downhill with the wind in our faces. After 25 hard miles, our campsite was just minutes away. Now I got this whole mountain biking deal. We were ripping! Until Dacus went airborne.

He lacked the luck I’d had earlier and bounced off his head before crashing onto his tailbone. Somehow he walked away, but with the air of a sky diver whose chute had only partly opened. We inspected his helmet. It had a crack down the middle.

“Wow,” I said. “You OK?”

“I think so,” he said, woozily.

“What happened?”

“It was so beautiful, I decided to look around for a second.”

“Big mistake.”

We camped that night next to coffee-colored creek called Magpie, in a copse of ash and cottonwood. It was shady down in there, so cool and quiet. I crawled on all fours into my tent and sat plucking ticks from my legs. I was spent, my body a factory of pain. But as I stared into the woods, into the fields beyond, I felt wide-awake.

The Maah Daah Hey was a long time in coming. Originally conceived as a horseback trail, it took the Forest Service a decade to stitch together the inaugural 96 miles in 1999 — a patchwork of federal, state and private lands — and in 2014 they finished a second section, called the Deuce, which tacked on 48.7 miles (there are more miles to come, pending federal financing).

For mountain bikers, who caught wind of the trail early on and now make up the vast majority of its 15,000 annual users, the wait was worth it. The Maah Daah Hey ranks with the storied Slickrock Trail in Utah and the McKenzie River Trail in Oregon as among the country’s greatest single-tracks. It laps both by more than 100 miles.

But the landscape of the Maah Daah Hey has a deeper meaning. The trail happens to run straight through what until the late 19th century had been home to scores of Badlands tribes, principally the Mandan, Hidatsa and Arikara, but also the Assiniboine, Blackfoot, Chippewa, Crow, and Oglala and Lakota Sioux (“maah daah hey”is Mandan for grandfather).

In fact, the trail is part of an ancient, intertribal trading and hunting network that once stretched all the way to South Dakota, Montana and the Knife River Indian villages near Stanton, North Dakota, where in 1804, Lewis and Clark met Sacagawea while wintering among the Mandan. On the heels of Lewis and Clark’s visit, the Mandan, Hidatsa and Arikara were nearly wiped out by smallpox. The survivors banded together and endured, but like all Badlands natives, they were eventually forced to forsake their ancestral lands for reservation life.

Before arriving in North Dakota, I had spoken to Gerard Baker, a Mandan-Hidatsa and former superintendent of the Mount Rushmore National Monument. It was Baker who had named the trail — at the Forest Service’s request — partly inspired by stories his late father, Paige Baker Sr., had told him about the long-standing Mandan-Hidatsa presence there.

“I wanted to name it ‘maah daah hey’ because grandfathers are always supposed to be around,” Baker said. “From a clanship standpoint, we Indians have a lot of grandfathers, and whether you’re having hard times or good times, they’re supposed to be there for you. That’s what the trail means. You can go out there by yourself and cry and nobody will hear you except the spirits, and they’ll help you.”

Baker had little interest in mountain biking, and saw the trail more as a symbol of his secular and spiritual bond with the Badlands.

“This is an area that the Mandan-Hidatsa associate with our spirits and our history,” he said, adding that the trail’s northern end is a short drive from the Mandan, Hidatsa and Arikara reservation at Fort Berthold. “The Badlands were closed off to us for so long. Now they’re open to us again. We have a lot of spirits that still live out there, and we feel an ownership to the land. Deep in our hearts, it’s still ours, man.”

At Baker’s suggestion, I had placed a clump of tobacco on the trail as Dacus and I had set out, praying to the four directions — North, South, East, West — for our safe delivery. Whether or not it was working seemed to be an open question.

Each morning we wondered what the day would bring. The wind was constantly at our backs, like a gentle hand pushing us. Rain that had churned the ground into impassable sludge days earlier was nowhere to be seen. Pronghorn sprung from crowns of gamagrass and foxtail barley. Western meadowlarks and bobolinks shot over the fields. At a place called Devils Pass, we gingerly negotiated a gangplank of shattered stone as the trail narrowed over a shadowy gorge.

But then the Maah Daah Hey mellowed into flatlands, veering southwesterly and roughly paralleling the Little Missouri River. We crossed the shallows carrying our bikes on our shoulders, wading the reddened, sluggish water up to our thighs. Dacus, hankering for a swim, plopped down in the middle and flapped his legs, kiddie-pool style.

We cruised into a maze of huge cottonwoods, a rare length of shade where the grass grew up past our saddles. This was the best part of the trail. The air was stunningly crisp, birdsong flaring and fading. The going was easy. I found a deer antler, a tiny forked thing that I stuffed into my pack, and a little farther on, a red-tailed hawk feather, fluted gray-black, rustling across the grass.

We headed up again, a dizzying climb in equatorial heat, past the tree line, then stopped for lunch on an alcove with amphitheater views. Miles and miles of rough country rolled to the horizon, a leafy sandstone valley sprouting interior courtyards and alleyways, the swollen sun overhead. Scattered incongruously on distant bluffs were several pump jack oil drilling rigs, most of them inactive, poised over the earth like herons.

Western North Dakota has some of the richest oil and natural gas reserves in the world — part of the vast Bakken Formation, a geologic superfund of sorts holding billions of barrels of oil, almost all of it reachable only through controversial fracking. During the height of its oil boom from 2006 to 2012, North Dakota produced over 1 million barrels per day, more than any state besides Texas. When the price of oil dropped in 2014, many rigs went idle.

By 3 p.m., we had put 22 miles behind us. Whooping and shouting, we rode a rushing swell of grass, birds in orbit all around, then dropped into a fang-shaped draw, snaking through shoals of heaped-up boulders. One boulder turned out to be a dead cow, its face and hindquarters eaten away. It was hard not to think of it as an omen.

Our camp was a wide basin a mile or two from Elkhorn Ranch, where a young Theodore Roosevelt lived from 1884 to 1887. Roosevelt loved the Badlands. He came to rely on their restorative qualities after wearying stints back East. As an avid hunter, partly what he loved was the chance to shoot the fast-disappearing bison, elk and bighorn sheep. Evenings, he’d sit on his veranda with a rifle close at hand.

But the Badlands eventually changed Roosevelt, giving shape to a conservationist credo. Sickened by the ravages of hide hunters, he protected 230 million acres of public land during his presidency, including a stunning parcel of North Dakota Badlands.

My notes from Day 3 are mostly unprintable here. Twenty-plus miles of blistering, infuriating, jackknifed rock. We pushed and pulled and lugged our oppressive, gear-laden bikes over nearly every inch of ground, cursing and sputtering.

We couldn’t get enough water. I have an image of Dacus slumped on the trail, febrile and panting, handkerchief covering his face, madly gulping from his water bottle while turkey vultures circled overhead. We decided to ration the four liters apiece we carried, just in case. When we reached a spot with some shade, Dacus lay down for a nap and I scrambled to the top of a butte, half-joking that I’d check my cell reception to see if I could call for a medevac.

As I sat there, a mule deer clomped into the clearing below me twitching its big khaki ears. Far off, wavering on the thermals, two golden eagles swung into view.

With twilight approaching, we found ourselves in a petrified forest, swerving wildly to avoid the blackened stumps. Camp had to be close by, we reasoned. But our map showed we were still an hour out. We weren’t quite in tears, but we were close.

Sooner or later, the Maah Daah Hey Trail, we had to admit, turns grown men into simpering mama’s boys. It’s a place for stern, bushwhacking cyclists and not for city kids after a fleeting nature fix. Dacus put our problem succinctly: “I think what we’re finding is our skill levels just aren’t very high.”

It was almost dark when we arrived in camp, plumb out of water and near the brink of physical and emotional collapse. By good fortune, four experienced mountain bikers were riding the trail that week, and they greeted us with restorative beers and a stir-fry dinner.

It was a no-brainer, deciding to wimp out on the last day. A shortcut via a graded service road, we realized, would put us back in Medora by lunchtime, nearly halving the trail’s last 28 miles. With a cloud of dust in our wake, we were in town by noon, sharing a large Hawaiian pizza and guzzling pints of beer.

As we sat toasting our accomplishment, I felt a twinge of pride. It hadn’t been pretty, and I was glad it was over, but we’d ridden the Maah Daah Hey Trail, or a good chunk of it anyway, and lived.

“Thanks for inviting me along,” Dacus said. “It was amazing. One of the most incredible trips of my life. And I’ll never do it again.”

But I thought happily of our last night in camp, of those gifted cans of Canadian beer, and of some Maah Daah Hey advice that Gerard Baker had given me: “Don’t just look, but listen. Stand out there in the middle of the night and listen. Listen to the trees and to the grass, because you’ll hear a lot in those Badlands.”

And I did. I stood in the darkness sipping beer and missing my wife, listening to the chirr of summer insects while the stars brightened, trying to tune my ears to the unknown.