U.S. Supreme Court Building

SAN FRANCISCO — In a secret court in Washington, Yahoo's top lawyers made their case. The government had sought help in spying on certain foreign users, without a warrant, and Yahoo had refused, saying the broad requests were unconstitutional.

The judges disagreed. That left Yahoo two choices: Hand over the data or break the law.