Four people have been sentenced to jail, and fined tens of millions of dollars, for buying discounted Microsoft software and then illegally reselling it at a profit.

Mirza Ali, 60, and Sameena Ali, 53, the husband-and-wife owners of Samtech Research, were sentenced this week to five years in prison and ordered to pay more than $25 million in fines to Microsoft for their role in a software reselling scheme run between 1997 and 2001.

The Alis and their associates purchased more than $29 million worth of software at Microsoft’s academic-discount rates and then resold it to non-academic entities, making more than $5 million in profits. The two were convicted in November last year, and had since been awaiting sentencing.

Previous to this, the Alis had already been kicked out of Microsoft’s Authorised Education Reseller (AER) program, but they “formed new corporations... to disguise their identity from Microsoft and re-enter the AER program,” the US Department of Justice said in a statement.

They laundered their profits by purchasing real estate in their son’s name and by wiring more than $300,000 to Pakistan, the DOJ said.

Two of the Alis associates, Keith Griffen, 56, and William Glushenko, 66, were also sentenced in connection with the case. Griffen, a partner in some of the Alis’ corporations, was sentenced to 33 months in prison and $20 million in fines. Glushenko was given one year of probation and 100 hours of community service.

The scam was exposed during the course of a two-year undercover investigation called “Operation Cyberstorm,” which was conducted by the Federal Bureau of Investigation and the US Internal Revenue Service.