In a surprising about-face, US Immigrations and Customs Enforcement (ICE) has announced that it will test-drive Research in Motion's new BlackBerry 10 operating system in January, having earlier said that it planned to drop RIM's platform in favor of iOS.

The pilot program, which will include both RIM's new BlackBerry 10 handsets and the BlackBerry Enterprise Service 10 enterprise management system, will make ICE one of the first US government agencies to try out the new OS.

"ICE has been a valued BlackBerry customer for years, and our commitment to government agencies has influenced the development of the BlackBerry 10 platform," RIM senior VP Scott Totzke said in a canned statement on Thursday.

That puts it somewhat mildly. Government contracts have long been a core component of RIM's business, which is one reason why the company has worked so hard to meet federal security standards. In November, it announced that BlackBerry 10, too, had been certified good enough for government work.

But RIM has struggled to maintain its Washington accounts in recent months, with one US agency after another announcing plans to jump ship to a competing platform – usually Apple's.

The General Services Administration, the National Oceanic and Atmospheric Administration, the National Transportation Board, and the Pentagon are just a few of the US agencies whose once-unflinching loyalty to BlackBerry has lately wavered or collapsed.

For a while, ICE headed that list. In September, the agency announced that it had spent $2.1m on iPhones to replace its BlackBerry devices, claiming that its business requirements called for "more capable and dynamic mobile technology."

With the announcement of its BlackBerry 10 pilot program on Thursday, ICE now seems to be stepping away from that position somewhat, although a spokesperson said the agency's iPhone plans were still going forward.

"We're not backing away from iOS, nor RIM," ICE press secretary Barbara Gonzalez told Bloomberg. "We've had a long and good relationship with RIM."

For its part, RIM has said it isn't worried about government contracts and that federal sales on the whole are up, although it admits that "the employee base is shrinking" as agencies shed jobs.

Make no mistake, however: sweat was surely wiped from many a RIM investor's brow following ICE's announcement, as it's widely believed that as RIM's government contracts go, so will follow the enterprise. RIM's shares closed up 4 per cent on the news. ®