The US and other governments around the world needed a lot of help getting data from Apple devices last year.

The number of national security orders issued to Apple by US law enforcement doubled to about 6,000 in the second half of 2016, compared with the first half of the year, Apple disclosed in its biannual transparency report. Those requests included orders received under the Foreign Intelligence Surveillance Act, as well as national security letters, the latter of which are issued by the FBI and don't require a judge's sign-off.

Critics of national security letters, like the Electronic Frontier Foundation, say they "allow the FBI to secretly demand data about ordinary American citizens' private communications and Internet activity without any meaningful oversight or prior judicial review." Companies that receive national security letters are subject to gag orders, which means they can't even disclose they've received such orders -- unless the letters become declassified.

That's what happened in Apple's case. It disclosed late Monday, as part of its most recent transparency report, that one of the national security orders it received came in the form of a declassified national security letter. It didn't provide any more information about the letter, including when it originally received the order or what the order involved. Other companies have shared more information about the requests when they're declassified.

Apple on Tuesday declined to comment beyond its transparency report, as did the US Department of Justice.

National security letters were enabled by the USA Freedom Act, which passed in 2015. As part of the regulations, the FBI has to re-examine past national security letters and decide which can be declassified. Those started being reported by recipients a year ago.

Apple's not the only company that's received national security letters. Twitter disclosed in January that it received two from the FBI in the last two years that previously came with gag orders not to discuss them. Google, Yahoo and Cloudflare also have published national security letters received from the FBI, some dating back to 2013.

For more on Apple's National Security Letter, see the coverage by CNET sister site ZDnet, which first reported on Apple's transparency report.

Battling the FBI

Apple has long helped US law enforcement agencies pull data from locked iPhones. But its willingness to help has changed over the past couple of years as the number of requests increase and as the government faces backlash over its surveillance tactics. Apple fought a very public battle against the FBI last year, and it has taken a strong stance in favor of protecting customer privacy.

The FBI's attempt last year to force Apple to unlock an iPhone used by a terrorist set up a grand legal battle between security and privacy. On one side was Apple, a massive tech company envisioning a future similar to the one in George Orwell's novel "1984" (which, coincidentally, has become a bestseller again after President Donald Trump's inauguration). On the other was the world's most powerful government, pointing to the threat of a terrorist attack if it can't get access to vital information.

Now playing: Watch this: FBI drops Apple court case after unlocking terrorist's...

The stakes were sky-high. Cybersecurity experts said the dispute could have far-reaching implications for everything from how private our personal photos are to how tech companies operate in other countries. But the battle ended in a draw when the FBI in March suddenly said it didn't need Apple's help anymore to unlock the phone.

Along with disclosing the number of national security orders it has received, Apple on Monday said it received 4,254 device requests in the US in the second half of 2016, down from 4,822 in the first six months of the year. It gave information in 78 percent of the cases in both halves of the year. Most device requests come from law enforcement agencies helping iPhone owners who've requested help locating lost or stolen devices. Other requests relate to fraud investigations.

Apple also said it received 2,231 account information requests across the globe in the second half of 2016. In the US, the total was 1,219. It gave data in regard to 79 percent of the global requests and 83 percent of the US orders. In the first half of the year, it provided data for 84 percent of the 1,363 US requests it received.

The company said "examples of such requests are where law enforcement agencies are working on cases where they suspect an account may have been used unlawfully or in violation of Apple's terms of service. Account-based requests generally seek details of customers' iTunes or iCloud accounts, such as a name and address; and in certain instances customers' iCloud content, such as stored photos, email, iOS device backups, contacts or calendars."

Life, disrupted: In Europe, millions of refugees are still searching for a safe place to settle. Tech should be part of the solution. But is it? CNET investigates.

Tech Enabled: CNET chronicles tech's role in providing new kinds of accessibility.