Microsoft co-founder Bill Gates says letting Google's Android platform become dominant was his "biggest mistake" at the company.

The Windows desktop operating system has been a core piece of Microsoft through much of its 44-year history, but Microsoft has failed to win a leadership position in mobile operating systems. It lags behind Alphabet's Google, and Apple. At today's Microsoft, Windows remains a contributor of revenue and profit, but Microsoft has moved on to focus more on cloud infrastructure and applications, essentially ceding the mobile platform business.

Gates made the comments to David Rubenstein on Monday, speaking at a Economic Club of Washington luncheon:

"We're in the field of doing operating systems for personal computers. We knew the mobile phone would be very popular, and so we were doing what was called Windows Mobile. We missed being the dominant mobile operating system by a very tiny amount. We were distracted during our antitrust trial. We didn't assign the best people to do the work. So it's the biggest mistake I made in terms of something that was clearly within our skill set. We were clearly the company that should have achieved that, and we didn't. We allowed this Motorola design win, and therefore the software momentum to go to Android, and so it became the dominant non-Apple mobile phone operating system globally."

At the time mobile computing was taking off, Microsoft's CEO was Steve Ballmer, not Gates. But Gates was still in some initiatives at Microsoft, holding the title of Chief Software Architect from 2001 through 2008 and Chairman of the Board until 2014.

The antitrust case "probably accelerated my retirement by five or six years, which, overall for me, probably was a good thing," Gates said. He said that in Microsoft's early years he bragged about not having an office in Washington D.C., and he has since come to regret doing that.

Gates' comments invoking the antitrust case from the U.S. Justice Department also come after reports about how federal regulators could be changing their approaches to looking at major technology companies, including Google. Earlier in the year Sen. Elizabeth Warren pointed to the Microsoft case as part of an argument that the government should seek to break up major technology companies.

Correction: This article has been updated to correct the spelling of David Rubenstein.

WATCH: Warren Buffett, Charlie Munger, Bill Gates on the state of the US-China trade talks