Both parties had agreed that the new law, the CLOUD (Clarifying Lawful Overseas Use of Data) Act, which was signed into law by President Donald Trump on 23 March, made the case moot.
The Supreme Court began hearing the case in February. After the new law was passed, the DoJ filed a motion seeking dismissal of the case, withdrew the original warrant and issued a fresh warrant to Microsoft it to release the emails.
Microsoft responded with a motion, agreeing that the case was moot and asking for some time to study the new warrant.
The Court also wiped out an appeals-court ruling that Microsoft won during an earlier stage of the case, as well as a contempt finding against the company.
The CLOUD Act states that warrants can apply to data that US-based tech companies store around the world. The companies can challenge warrants in court, based on privacy laws in the country where the data is stored.
The Act allows the US to have bilateral agreements with other countries on addressing data disputes, including those countries’ requests for data that is physically stored in the US.
The emails in question were initially sought by the Department of Justice in 2013, through a warrant issued under the Stored Communications Act, with the reported reason being that they were to do with a probe into drug trafficking.
Microsoft sought to quash the order, but a magistrate judge refused to do so in April 2014. The company appealed the verdict to a federal district judge, only to see the order upheld. Additionally, the court said the company was in contempt of court for refusing to hand over the emails.
In July 2016, the US Court of Appeals for the Second Circuit based in New York reversed this decision by the Southern District of New York court which had held Microsoft in contempt of court for refusing to hand over the customer emails.
And in January 2017, the US Court of Appeals for the Second Circuit, in a 4-4 decision, refused to rehear an appeal of its own decision.
The case then went to the Supreme Court which held its first hearing in February.
Microsoft president Brad Smith said in a statement: “We welcome the Supreme Court’s ruling ending our case in light of the CLOUD Act being signed into law.
"Our goal has always been a new law and international agreements with strong privacy protections that govern how law enforcement gathers digital evidence across borders.
"As the governments of the UK and Australia have recognised, the CLOUD Act encourages these types of agreements, and we urge the US Government to move quickly to negotiate them."