Updated

It took eons, but Nokia is finally making the Android phones we always hoped it would make. To get here, Nokia had to lose its grip on the mobile business, choose Windows Mobile as its only smartphone OS, and then sell its entire mobile division to Microsoft. But the American software giant was unable to make anything good come out of its Nokia Lumia and Windows Phone brands, turning the acquisition into a failure of epic proportions.

Meanwhile, Microsoft is selling its feature phone business to Foxconn. And Nokia is licensing its name, which it's buying back from Microsoft, to a company that will work with the same Foxconn subsidiary to make feature phones, Android smartphones and Android tablets in the near future.

The point is, Nokia is finally making Android phones, even if it won't actually build them.

More from BGR:

Super fast internet speeds are coming this year... through your regular phone lines

The Finnish company announced that it will grant HMD global Oy (HMD) exclusive rights to make Nokia-branded phones and tablets for the next 10 years.

HMD acquired from Microsoft the rights to use the Nokia brand on feature phones and some design rights, with the transaction set to close in the second half of 2016. The company intends to invest over $500 million over the next three years to support its mobile push.

Nokia did make crappy Android phones in the past, but they were running an Android fork that did not have any Google services on it. This time around things are going to change. "HMD's new smartphone and tablet portfolio will be based on Android, uniting one of the world's iconic mobile brands with the leading mobile operating system and app development community," the company says.

HMD will work with FIH Mobile Limited to build a global business for Nokia-branded mobile products. FIH is the Foxconn subsidiary that agreed to purchase Microsoft's feature phone business for $350 million.

Nokia will receive royalty payments from HMD, will have a seat on the board "and set mandatory brand requirements and performance-related provisions to ensure that all Nokia-branded products exemplify consumer expectations of Nokia devices, including quality, design, and consumer-focused innovation."

HMD would be led by Arto Nummela, former Nokia senior exec, and current head of Microsoft's Mobile Devices business for Greater Asia, Middle East and Africa and of Microsoft's global feature phone business.