Editor's note: Steven Levy is the author of "In the Plex," a new book about Google's history.

(WIRED) -- So Microsoft is buying Skype for $8.5 billion, its biggest deal ever. It's too soon to make a pronouncement on whether the purchase is an idiot move, a brilliant one or just something in between. All the geniuses who ripped the investors who bought Skype from eBay in 2009 don't look so smart now.

But I will recount a bit of history that readers of "In the Plex" already know: It was almost Google who owned Skype.

Here's more detail on the story:

In 2009 a brilliant product manager named Wesley Chan was in charge of Google Voice, which was still in development. It was Google's revamp of Grand Central, which Chan had snared in an acquisition the year before.

When some Google executives heard that eBay was selling Skype, they jumped on the opportunity and began negotiating.

As Chan helped with due diligence, even going to Europe to see Skype firsthand, he became convinced that the purchase was a bad idea for Google. He concluded that one of Skype's key assets -- its peer-to-peer technology -- was a mismatch for Google, which worked on the newer paradigm of cloud computing.

"The worst thing about peer-to-peer is that it doesn't work well with Google," Chan told me during an amazing interview for "In the Plex" in February 2010. "Peer-to-peer just eats up your bandwidth, right, it's like the old technology."

So if Google bought Skype, Chan concluded, it would have to rewrite the entire Skype platform. Worse, buying Skype would have involved an extensive review process by the government, involving the Department of Justice or the FCC or both.

Chan figured that it would take 18 to 24 months to get through that process, during which Google would be at a standstill in the space. "It would've been disastrous," he said.

But Google was well along on its hunt. "Everybody wanted to do it," Chan said, "Eric [Schmidt] was bullish on it. And I said, 'Uh-uh.'"

It was then that Wesley Chan began his plan to derail the deal. Chan happened to be close to a number of people who are unheralded powers at Google, mainly early Googlers close to Larry Page and Sergey Brin whose opinions are highly regarded.

One of those was Salar Kamangar, one of Google's first 10 employees and the co-creator of AdWords. (He is now the CEO of YouTube.) After Chan explained his objections, Kamanger was on board to scuttle the deal.

"Salar and I laid the grenades," Chan told me. According to Chan, the pair went to Brin and convinced him it was a terrible deal. Then, Chan said, they brainstormed a plan to sabotage the deal in a key meeting of top executives, a gathering that presumably was likely to wind up blessing the purchase otherwise.

The idea was to bait-and-switch: The executives in favor of the deal would assume that everything was on track, and Chan and his allies would use shock and awe to turn things around.

Chan said that he began the meeting by praising the deal. "I even had a [PowerPoint] deck that was super supportive of it," he said.

But, according to Chan, halfway through the deck, Brin seized the floor "and started getting really negative." He asked a series of questions that he knew would get unsatisfactory answers.

Is this purchase data-driven? Who is going to spend all those months commuting to Europe? (No one stepped up.) How long is the government review expected to take?

As Chan had figured, the advocates of the deal were unprepared to respond to these last-minute objections.

Chan then described the climatic moment. "[Sergey] looks at me and says, 'Why would I want this risk? We have a team capable of building the carrier, we have the users, we have hundreds of millions of Gmail users, why do we need to have Skype?' And at that point, Sergey gets up and says, 'This is the dumbest shit I've ever seen.' And Eric gets up and walks out of the room, and I'm like, okay, the deal's off." And it was.

After he described this to me, I asked Chan what Larry Page was doing in all this.

"Larry was kind of, oh, whatever," Chan said. "He was checking his laptop. I don't think he was the one that really cared about this as much [as Eric]."

Now of course, Larry is in charge of Google and fully engaged. I wonder what he's thinking about Microsoft's Skype deal, which is grabbing headlines just as Google's I/O conference gets underway.

At least it wasn't Facebook making the buy.

Subscribe to WIRED magazine for less than $1 an issue and get a FREE GIFT! Click here!

Copyright 2011 Wired.com.