By David Ingram

WASHINGTON (Reuters) - U.S. technology companies may give the public and their customers more detail about the court orders they receive related to surveillance under an agreement they reached on Monday with the Obama administration.

Companies such as Google Inc and Microsoft Corp have been prohibited from disclosing even an approximate number of orders they received from the U.S. Foreign Intelligence Surveillance Court. They could give only an aggregate number of U.S. demands that combined surveillance court orders, letters from the FBI, subpoenas in run-of-the-mill criminal cases and other requests.

The deal frees the companies to say, for example, approximately how many orders they received in a six-month period from the surveillance court.

Apple Inc quickly seized on the agreement to disclose that it had received fewer than 250 demands related to national security during the first six months of 2013 - a number the company previously was barred from giving and that it said was "infinitesimal relative to the hundreds of millions of accounts registered with Apple."

Tech companies have sought to clarify their relationships with U.S. law enforcement and spying agencies since June, when leaks to the news media by former National Security Agency contractor Edward Snowden began to show the depth of U.S. spying capabilities.

President Barack Obama's administration, however, was wary of disclosing data it believed might help suspected militants in other countries avoid surveillance.

The dispute wound up in front of the surveillance court, a secret court in Washington, D.C., that oversees national security investigations. Five companies asked the court to grant them the authority to disclose data about the court orders they receive.

The agreement, which was filed on Monday with the surveillance court, brings an end to the litigation.

The five companies said in a joint statement: "We filed our lawsuits because we believe that the public has a right to know about the volume and types of national security requests we receive. We're pleased the Department of Justice has agreed that we and other providers can disclose this information."

The companies were Facebook Inc, Google, LinkedIn Corp, Microsoft and Yahoo! Inc. Apple filed a brief supporting the five companies.

The agreement applies to all companies and gives them options on how to present information.

NUMBERS OF ORDERS

A company that offers email services, for example, would be able to say it received between zero and 999 orders from the Foreign Intelligence Surveillance Court during a six-month period for email content belonging to someone outside the United States.

"Permitting disclosure of this aggregate data addresses an important area of concern to communications providers and the public," Attorney General Eric Holder and Director of National Intelligence James Clapper said in a joint statement.

The agreement does not cover what the NSA might gather covertly in bulk outside the United States, only what it gets directly from the companies.

The agreement carves out some other exceptions. The numbers companies can give are only ranges: sometimes in increments of 250, and sometimes in increments of 1,000. Apple said the national security orders it received totaled between zero and 249.

If a company introduced a new communications platform, it would need to wait two years before telling the public about a court order for information about that platform. The silence is designed to lull suspected militants into using, or continuing to use, new forms of communication.

Obama had pledged greater transparency about U.S. surveillance programs, most recently in a speech he delivered at the Justice Department on January 17.

After months of negotiations among the tech companies, Justice Department lawyers and intelligence officials, a breakthrough came about the night before that speech, according to a government official who spoke on condition of anonymity.

At that meeting with White House officials, James Cole, the deputy attorney general, described details of a possible compromise, the official said. The reaction within the administration was positive, and during conference calls the following week, the companies agreed to the proposal.

The companies said in their statement on Monday that they would consider lobbying lawmakers on other, unspecified fronts.

"While this is a very positive step, we'll continue to encourage Congress to take additional steps to address all of the reforms we believe are needed," they said.

(Editing by Howard Goller, Andre Grenon, David Gregorio and Cynthia Osterman)