The US government says it will declassify parts of a 2008 secret court order that required Yahoo to turn over customer data under the National Security Agency's Prism data-gathering programme.
In a filing with the Foreign Intelligence Surveillance Court, the Justice Department said that the declassification would make possible the publication of "much of the court's opinion and order". But the department said that some of the information in the opinion must remain secret and would be redacted.
The ruling came after the presiding judge on the court ordered the government to conduct a "declassification review" of the 2008 order and legal briefs in the case.
Yahoo was among several US internet businesses identified as giving the National Security Agency access to customer data under the Prism programme. In a filing with the Fisa court in June, Yahoo asked that the 2008 opinion be released, along with legal briefs in the case.
In a subsequent filing the next month, Yahoo said that the disclosure of the opinion and briefs would allow the company to "demonstrate that it objected strenuously to the directives that are now the subject of debate, and objected at every stage of the proceeding", but that its objections were overruled.
The case is separate from another one Yahoo has pending that urges the Fisa Court to allow the company to disclose data on national security orders it received under the Foreign Intelligence Surveillance Act. Facebook, Google and Microsoft have similar motions pending with the court.
Neither Yahoo nor the Justice Department had any comment on Thursday's filing.
Separately, Brazil's president has asked MPs to vote urgently on a Bill that would force foreign companies to store all data about their Brazilian clients on servers based in the country - a move seen as essential for user security after repeated reports of internet spying by the US. The "internet constitution" Bill has lingered in the lower house since 2011 and includes many provisions extending protections to web users in Latin America's biggest nation, one of the world's biggest users of social media like Facebook and Twitter.
President Dilma Rousseff met the bill's sponsor, Deputy Alessandro Molon of the governing Workers Party, earlier this week, and asked that he insert language that would force internet companies to keep their servers on Brazilian soil if they wanted to do business in the country, the deputy's office said. That would force companies to follow Brazilian privacy laws for the information on those servers. Ms Rousseff and other officials have been enraged at revelations that the NSA's espionage programmes targeting global communications have focused on Brazil.