In what can only be described as a move against online giant Google, close allies Microsoft and Facebook this week engaged in a set of tech patent deals that see the firms protecting each other against future licensing threats.

The two firms engaged in two separate deals, both of which were based on Microsoft’s earlier purchase of $1.1 billion in AOL patents. You might recall that some had questioned the heady price that Microsoft paid for AOL’s 925 patents. But this week’s deals cast a new light on that price.

First, Facebook has agreed to purchase roughly 650 of the AOL patents from Microsoft for $550 million in cash. It will provide Microsoft with a non-exclusive license to use those patents as well.

Second, Microsoft has agreed to non-exclusively license the remaining 275 AOL patents to Facebook. (It had previously agreed to also license 300 additional AOL patents as part of its previous deal with AOL.)

The arrangement creates a situation in which Facebook suddenly has a valuable cache of tech patents it can use to protect itself against future patent-licensing claims. “This is another significant step in our ongoing process of building an intellectual property portfolio to protect Facebook’s interests over the long term,” Facebook General Counsel Ted Ullyot noted.

And Microsoft, once seen as gullible for overpaying AOL, has nicely offset its earlier purchase (and separate licensing) of AOL patents by half, while retaining full rights to the purchase. With that $1.1 billion price suddenly halved to $550 million, the company doesn’t look so silly anymore.

Although it’s unclear why Facebook and Microsoft have such a special relationship, the closeness of the two firms is undeniable. Since a minor (and, for whatever it’s worth, seemingly overpriced at the time) $240 million investment in Facebook in 2007, the two firms have been closely tied, with Facebook utilizing Microsoft advertising and Bing technologies in its service and Microsoft deeply integrating Facebook functionality into its Windows Phone OS, a feat that still hasn’t been matched by the iPhone or Android, the two major players in the smartphone market.

Of course, the relationship’s strength could simply come down to a shared loathing and fear of Google. The patent deals come amidst a series of tech industry patent battles that involve courts on several continents and dozens of companies. Most of the biggest battles are tied to Google, directly or indirectly, since the online giant is undermining the competition via unlicensed use of their technologies.