A federal judge this week ordered a California man who had pleaded guilty to stealing copies of “The Revenant” and “The Peanuts Movie” from 20th Century Fox and sharing them illegally via a piracy website to pay the studio $1.12 million in restitution.

William Kyle Morarity, 31, of Lancaster, Calif., was sentenced for felony criminal copyright infringement after he admitted swiping screeners of the films when he was working on the studio’s lot last year. This week U.S. District Court Judge Stephen V. Wilson sentenced him to eight months’ home detention and 24 months’ probation, in addition to the fine. Morarity had been facing a maximum sentence of up to three years in federal prison.

Using the screen name “clutchit,” Morarity uploaded “The Revenant” to a torrent website called Pass the Popcorn six days before the movie’s debut in a limited theatrical release on Christmas Day 2015, according to authorities. More than 1 million users downloaded the film over a six-week period, causing Fox to lose more than $1 million.

“The defendant’s illegal conduct caused significant harm to the victim movie studio,” Eileen M. Decker, U.S. Attorney for the Central District of California, said in a statement. “The fact that the defendant stole these films while working on the lot of a movie studio makes his crime more egregious.”

“The Revenant” ended up grossing $183.6 million at the U.S. box office, plus $349.3 million internationally, according to Box Office Mojo. Director Alejandro Gonzalez Inarritu and star Leonardo DiCaprio both won Academy Awards for their work on the film.

According to officials, Morarity has agreed to assist the FBI in producing a public service announcement about the harms of copyright infringement and piracy. Morarity copied the Fox screeners onto a portable drive and uploaded the movies from his home computer on Dec. 17 and 19, 2015.