Facebook and Microsoft have struck agreements with the U.S. government to release limited information about the number of surveillance requests they receive, a modest victory for the companies as they struggle with the fallout from disclosures about a secret government data-collection program.

Facebook on Friday became the first to release aggregate numbers of requests, saying in a blog post that it received between 9,000 and 10,000 U.S. requests for user data in the second half of 2012, covering 18,000 to 19,000 of its users’ accounts. Facebook has more than 1.1 billion users worldwide.

The majority of those requests are routine police inquiries, a person familiar with the company said, but under the terms of the deal with the Justice Department, Facebook is precluded from saying how many were secret orders issued under the Foreign Intelligence Surveillance Act.

Until now, all information about requests under FISA, including their existence, were deemed secret.

Microsoft said it had received requests of all types for information on about 31,000 consumer accounts in the second half of 2012. In a “transparency report” Microsoft published earlier this year without including national security matters, it said it had received criminal requests involving 24,565 accounts for all of 2012. If half of those requests came in the second part of the year, the intelligence requests constitute the bulk of government inquiries. Microsoft did not dispute that conclusion.

Google said late Friday that it was negotiating with the government and that the sticking point was whether it could only publish a combined figure for all requests. It said that would be “a step back for users,” because it already breaks out criminal requests and National Security Letters, another type of intelligence inquiry.

Facebook, Google and Microsoft had all publicly urged the U.S. authorities to allow them to reveal the number and scope of the surveillance requests.