Neal Stephenson's no stranger to ambition, but his new novel Seveneves stretches to lengths (and heights) that beggar the imagination.

Neal Stephenson's been working on Seveneves since 2004, and in the end, he wrote what amounts to a trilogy in one volume, a book of startling ambition, vision and, ultimately optimism that dazzles even when it gets bogged down in some highly technical particulars.

Seveneves opens with the destruction of Earth's moon, sundered into seven enormous chunks by a rogue micro-black hole that, apart from dramatically changing the look and feel of the night sky, does very little — at first. After all, the mass of the moon is still right where it was, in the same orbit, exerting the same tidal forces.

Then the rocks start to bang into each other.

As the moon's seven massive chunks begin to fragment, the world's scientists reach a quick, dreadful and unanimous conclusion. Within the next two years, the moon will be reduced to tiny chunks that will de-orbit into the Earth's gravity well, burning up in the atmosphere at such a tremendous pace that the Earth's surface will be sterlized by the resulting heat — and this "hard rain" will go on for five thousand years.

This is the setup for the first part: Earth comes together in a spirit of dreadful, fatalistic optimism and decides to continue its legacy by putting a cluster of micro-arklets into space, each one holding four or five people, tethered together in small, autonomous clusters that can nimbly swing out of the way of the deadly chunks of moon they share orbit with. The whole planet's resource is thrown into this project, every economy and scientific endeavor given over to it, as the time ticks away to the end of our planet and possibly our species. Hopeful humans digitize the genomes of their organisms, make backups of the Internet, and freeze as many embryos as they can harvest as a bid to keep their species alive.

This futuristic take on Nevil Shute's On the Beach should be less sad than its predecessor — after all, Shute's humanity knows that it hasn't any chance of surviving, while Stevenson's human race is engaged in a (near)-unanimous bid to preserve its species against terrible odds — but it isn't. As the people of Earth are given suicide pills to take with their children when the sky catches fire, Stephenson builds up a sense of brutal inevitability, of humanity's insignificance in the cosmos that had me putting the book down for hours at a time, unable to read on (but my curiosity always overcame my sorrow).

Meanwhile, in space, the astronauts, billionaire Elon-Muskovite mavericks, Neil deGrasse Tysonoids, and chosen successors to the human race are hardly in better shape. They're making a bet with very long odds, and despite their great work, lack that unanimity that has united the doomed people of Earth. As the skies of Earth turn white and the last messages float up from the surface, the Spacies have every reason to believe that they have merely delayed the inevitable.

Part two tells the story of what happens next — the bitter infighting, the technical heroism, the self-sacrifice and wholesale death as humanity's last survivors struggle with their field-expedient, improvised space-habitat.

Part one necessarily concerned itself with physics as well as drama, but in this part, physics is really the star. The arklets and the ISS are locked in a battle with the cold equations of physics, the universe's intractable logic of orbits, energy, thrust, temperature differentials, decay and drag. Stephenson plays off a familiar, intricate tale of Machiavellian intrigue against a highly technical, intense story about humanity versus the elements, and uses the human drama as an engine to pull the story's train, which often consists of lectures on physics, which can run both long and dry. However, they are always there for a purpose: once you grasp the tolerances of the physics and engineering problem Stephenson has set for his characters, a new, uniquely science fictional kind of drama unfolds, with the visceral intensity of watching a mountain-climber scale a sheer rockface by her fingernails.

Part two ends with the human race in the direst of straits, but still hanging on by those fingernails, and setting in motion a plan to rebuild.

The final part of the book opens five thousand years later, and the Earth is finally inhabitable again. A new kind of humanity, speciated into seven tribes based on the maternal DNA of the survivors of the space colony, has swollen to billions, and undertaken breathtaking feats of celestial engineering, girding the Earth with orbiting habitats from which they can bombard the planet with water, then microorganisms, then seedpods containing the seeds of lifeforms synthesized from the databanks of old Earth, until finally, a lush new planet unfold beneath them, ready for habitation.

There's only one problem — humanity itself. Over five thousand years, humanity has fractured into two great warring tribes, with many subtribes and factions. Each worries that the other will steal the Earth they've all dreamed of for millennia. Fragile as the peace between the Blue and Red factions is, it is stretched and may break with the discovery of what may be another kind of human race, improbably still alive on poor old Earth.

This third section is something like a fantasy novel, in which a group of diverse warriors (soldiers), mages (scientists), scouts and even a fresh-faced apprentice must venture into the unknown, but set against a backdrop that is at once pastoral and brilliantly ambitious in its technological speculation (Stephenson thanks Freeman Dyson for inspiration in the afterward). This third story — about a burgeoning civil war and an engineering practice that puts unimaginable power in the hands of imperfect humans, is a fitting counterweight to the first section, which pits humans' better natures against an unconquerable engineering problem.

This is a long book, and it has a little of everything in it. There were places where a little felt like too much for me, and I'd bet you feel the same way — but that we'd disagree about which places dragged. That's really everything you could ask for in science fiction.

Seveneves [Neal Stephenson/Harpercollins]

-Cory Doctorow