On May 20, 2014, Satya Nadella — the recently appointed CEO of Microsoft — sat down next to Microsoft Surface boss Panos Panay in a packed New York City auditorium.

They were there to launch the Surface Pro 3, the newest version of Microsoft's tablet.

"This is a big day," Nadella told Panay. "Let's get it right."

The pressure was on: The first generation of Surface tablets had performed so badly in the market, Microsoft had to take a $900 million write-down for unsold inventory in 2013. The second Surface hadn't fared much better.

Nadella had told Panay that the third version had to be right: "We need to make hardware that gives us permission to be in hardware."

'We need to make hardware that gives us permission to be in hardware.' — Microsoft CEO Satya Nadella

Panay knew what he was up against, but he was confident they were going to get it right on the third try. "You have a vision. You have a whole vision. It's never one generation that's going to get you there," Panay tells Business Insider.

Now Microsoft has won a reputation as the trendsetter in tablets, with companies like Dell and HP following suit.

And when Apple announced the iPad Pro in late 2015, the whole world couldn't help but notice that, with its keyboard cover and big screen, it looked a lot like the Microsoft Surface Pro 4.

Last year also saw the launch of the Microsoft Surface Book, the company's very first actual laptop, to positive reviews, with Wired calling it "the most exciting Windows laptop in years."

Microsoft? A hardware company?

Indeed, there's a little bit of a hardware renaissance going on in Redmond, with a brand-new and gorgeous Xbox One S, the Surface Hub mega-tablet, and the Microsoft HoloLens all showing promise. There are even positive signs that the category of computers created by the Surface and Surface Book are helping turn around the overall shrinkage of the PC market.

But it almost didn't work out that way. Here's how the Microsoft Surface was created — and how it's dragging Microsoft itself into the next phase of computing.

View photos microsoft store surface RT More

A showcase for Windows 8

Around 2009, Microsoft's Windows division, then led by Steven Sinofsky, had started work on Windows 8.

The Apple iPhone, released in 2007, had ushered in a new era of touchscreen-friendly computing, and Sinofsky's team was planning to push Windows into the future.

The new operating system would forgo classic elements of the operating system, including the iconic Start menu that had been around since Windows 95 in 1995, in favor of a new so-called Metro interface, with big, colorful "tiles" that were easy to push with your finger.

The problem was, PC manufacturers of the day were pretty happy making the traditional laptop and desktop computers that they always had and were focused on building "netbooks," super-cheap Windows computers that offered a crummy user experience.

Microsoft worried that nobody in the Windows PC world was going to make the perfect touchscreen Windows computer that would "usher us in to that new era in computing." Panay says.

"We needed to ensure it would happen right."

View photos steven sinofsky panos panay microsoft surface 2012 More