Microsoft has won a long-running case in the US Supreme Court about the reach of US patent laws.
The case was about Windows-based computers made outside the US
The court ruled that Microsoft was not liable in a software patent dispute involving US telecoms operator AT&T.
AT&T had sued Microsoft, alleging computers using Microsoft's Windows operating system had breached its patent in voice compression software.
Microsoft accepted patent violations in the US, but argued the infringement should not be extended internationally.
AT&T had said it should be entitled to damages for all Windows-based computers manufactured outside of the US.
But in a 7-1 ruling, the US Supreme Court backed Microsoft's position.
Analysts said the decision could affect other lawsuits against Microsoft and potentially save the company billions of dollars because of the size of its global operations.
"The presumption that United States law governs domestically but does not rule the world applies with particular force in patent law," said Justice Ruth Bader Ginsburg.
According to the judges, an earlier ruling by the federal appeals court had gone too far and helped to build up a period of patent protection.
The judges ruled that the appeal court applied its test in a way that was too narrow and too rigid.
Shares in Microsoft rose on the news, climbing by 1% to $30.34 on the US Nasdaq exchange.