Microsoft General Counsel Brad Smith, left, with Steve Ballmer AP After more than two years of appeals, Microsoft lost in front of the Supreme Court and will have to pay Canadian company i4i about $300 million.

i4i first won a jury verdict against Microsoft for patent infringement in Word back in May 2009. Microsoft removed the infringing feature from Word in 2010, while appealing to try and overturn the verdict. At one point, an appeals court ordered Microsoft to pay i4i $290 million.

Finally, in January the Supreme Court agreed to hear Microsoft's challenge to a particular part of patent law used in the case.

Today, the Court ruled unanimously against Microsoft, which means the company will finally have to pay up.

The fine is the largest patent-infringement fine upheld by an appeals court.