The New York Police Department must replace some 36,000 smartphones running Microsoft's defunct Windows Phone platform, and plans to provide its officers with replacement iPhones by the end of the year.

The NYPD's ill-advised investment in Windows Phone, as detailed by the New York Post, lasted just two years. The switch to Apple's iPhone was prompted by the announcement from Microsoft in July that it has terminated support for Windows Phone 8.1.

The 36,000 phones were purchased as part of a $160 million program intended to help modernize New York City's police force with new technology. Officers were equipped with Nokia Lumia 830 and Lumia 640XL smartphones.

It was not indicated which iPhone model, or models, the NYPD plans to switch to, but the Post did indicate that the handsets would be brand new models.

Smartphones have become a crucial tool in law enforcement, with the NYPD using them on the street to receive alerts, search databases, file reports, and even get real-time updates on 911 calls.

The NYPD investment in Windows Phone, first announced in late 2014, was questioned at the time because of Microsoft's small share of the smartphone space. The release of Windows Phone 8.1 failed to turn the tide against the more dominant iPhone and devices running Google's Android.