Microsoft’s 2019 fiscal year was one of its busiest ever for acquisitions, led by its $7.5 billion GitHub deal.

The tech giant spent a total of $9.1 billion on 20 acquisitions in its 2019 fiscal year, which ended June 30, according to its newly released annual report. GeekWire research shows that 2019 ranks as Microsoft’s third-biggest year for acquisitions, both in the number of deals and in spending, since 2003. That’s when Microsoft started breaking out M&A information in annual filings.

Outsized acquisitions tend to drive Microsoft’s big spending years, and 2019 fit that trend. The GitHub deal made up 82 percent of Microsoft’s acquisition spending for the year. It represents the third largest deal in company history. Microsoft’s other 19 acquisitions totaled $1.6 billion, for an average price of $84.2 million.

Microsoft acquired a diverse group of companies, generally aligned with its top priorities in areas such as Internet of Things, education, and artificial intelligence.

The company acquired several game studios to beef up production for Xbox Game Studios. And several of Microsoft’s recent blue-chip acquisitions made purchases themselves, with LinkedIn scooping up employee engagement startup Glint for a reported $400 million and AI-powered marketing company Drawbridge and GitHub acquiring code review software maker Pull Panda and code security company Dependabot.

Microsoft has spent more than $9 billion on acquisitions and made at least 20 acquisitions only two other times since 2003. By far, the company’s biggest acquisition year was 2017, when the $26.2 billion LinkedIn deal closed. Microsoft didn’t disclose in its annual filing that year how much it paid for the other six companies it acquired, but the LinkedIn deal alone nearly tripled the company’s previous record spending year.

Microsoft’s second-priciest fiscal year was 2015 when it acquired Nokia for $7.2 billion. Other big years include 2008 when it bought Seattle-based digital advertising company aQuantive for $6.3 billion and 2012, which included the $8.5 billion acquisition of Skype, the second biggest purchase in company history

Between fiscal years 2015 and 2019 — the five full years Satya Nadella has been at the helm as CEO — Microsoft has made an average of 14 acquisitions per year.

Microsoft has had a checkered history with major acquisitions. In 2012, the company took a $6.2 billion writedown, largely tied to aQuantive, which the company admitted at the time wasn’t working out as planned. In 2015, Microsoft cut 7,800 jobs and took a $7.6 billion charge related to its acquisition of Nokia’s smartphone business.

The jury’s still out on LinkedIn and GitHub. But Microsoft learned an important lesson from LinkedIn that it is applying to the acquisition of GitHub: use its vast resources to supercharge the companies it acquires, and then get out of the way.

“What we learned from the LinkedIn acquisition is that when we invest our resources to help somebody do an even better job of what they were doing already, they can grow faster,” Microsoft President Brad Smith said at a conference last year.