Microsoft was at a crossroads, and Surface was at risk of becoming roadkill.

The year was 2013, just five years ago. Steve Ballmer had announced plans to step down as Microsoft CEO. The company was charging ahead with its ill-fated plan to acquire Nokia’s smartphone business. Microsoft’s Windows team was undergoing a leadership shakeup following the Windows 8 flop. And the Microsoft Surface hardware business, still a novelty inside a company built on software, was reeling from a $900 million financial blow.

“With so much turmoil happening inside the company, Surface’s only hope at survival was a home run,” writes technology journalist Brad Sams in his new book, due out today. “And while no one said it publicly, if the next iteration of Surface failed to win in the market, the brand and the hardware would cease to exist.”

This is the dramatic tension that leads to the big plot twist in “Beneath a Surface: The Inside Story Of How Microsoft Overcame a $900 Million Write-Down To Become The Hero of the PC Industry.”

The outcome won’t be a spoiler to those who follow Microsoft closely: The launch of the Surface Pro 3 in 2014 helped to revive the company’s hardware business by aiming to be best-of-class for work and productivity applications, rather than trying to outdo Apple, Google and others in consumer technologies and apps. As a first-party hardware maker, Microsoft has since established itself as a top 5 PC vendor in the U.S. by unit shipments, just behind Apple.

But even those who know the company well will glean insights from Sams’ book, thanks to behind-the-scenes details that provide new information about the internal debates and decisions that shaped the Surface business. sections on the ups and downs of Microsoft’s high-profile NFL partnership, and the circumstances that led to reliability problems with several models of Surface tablets and laptops.

The story of the Surface business also serves a larger purpose, providing a window into Microsoft’s broader transition and rebound. It’s an especially timely story this week, as Microsoft and Apple trade the lead as the most valuable publicly traded U.S. company. Under CEO Satya Nadella, Microsoft overall has doubled-down on productivity, cloud and enterprise technologies, and reduced its focus on consumer devices and applications.

Inside the Surface business, the emblem of this transition was Microsoft’s decision, under Nadella, to kill the unannounced Surface Mini just days before it was to be released in June 2014. This was due in part to concerns about the limited library of Windows apps on the ARM platform, which had also hampered the original Surface RT tablet. Microsoft instead championed the Intel-based Surface Pro 3, with its 12-inch display and 3:2 aspect ratio, more suited to productivity applications than the previous 16:9 widescreen Surface tablets.

At 155 pages, “Beneath a Surface” is a fast and enjoyable read. Sams, the executive editor for IT and tech industry news sites Petri.com and Thurrott.com, has a track record of scoops about Microsoft and its hardware business.

Continuing that tradition, the book concludes with new details about Microsoft’s future Surface product roadmap, including the latest information on its plans for a dual-screen foldable device, code-named Andromeda. Sams reports that the device is currently slated for a late 2019 release, in a larger form than many people have been expecting, although he cautions that the company’s plans could still change.

A former Neowin editor, Sams draws on more than a decade of reporting for the book, in addition to information from what he describes as nearly two dozen anonymous interviewees, including unnamed current and former company insiders.

The book offers plenty of new information, plus entertaining stories such as the tale of how Sams got his hands on the “lost” Surface Mini tablet prototype. But I found myself wishing at times for more quotes from named sources, and more juicy inside stories and anecdotes. For example, as a reader, I wanted to hear directly from Microsoft Surface chief and hardware leader Panos Panay, reflecting now on the last-minute decision by Microsoft’s senior leadership team to kill the Surface Mini, despite his efforts to save it.

One of the book’s strengths is its clear explanation of what Microsoft is trying to accomplish with the Surface business, creating new form factors and establishing a market for premium Windows devices, while running interference for its PC partners against Apple at the high end of the hardware market. The book is comprehensive and up-to-date, spanning from the original Surface tablets to the Surface Studio, Surface Book and Surface Laptop, and even touching on the recently released Surface Headphones.

In the end, “Beneath a Surface” is a case study in one company’s ability to play to its core strengths, find a successful niche in the market, overcome internal turmoil and manage complicate relationships with industry partners to reverse its fortunes. It’s a great read for anyone interested in navigating the complex world of business and technology.

GeekWire partnered with Steve Ballmer and his USAFacts initiative on the Numbers Geek podcast , exploring the data behind some of the most significant issues facing the country, as well as business and sports.]