Two men who helped smuggle Cuban baseball stars into the U.S. were sentenced to prison Thursday in federal court in Miami.

According to the Miami Herald, sports agent Bart Hernandez received a four-year sentence for his role and trainer Julio Estrada got a five-year sentence. The report said both men plan to appeal their sentences. They have been living in their homes with electronic monitoring since being found guilty in March.

Hernandez's conviction involved conspiring to deceive the U.S. to grant visas to two dozen Cuban ballplayers, allowing them to sign with MLB teams. Former Marlins shortstop Adeiny Hechavarria was among the players he illegally aided. He was also convicted of illegally bringing MLB outfielder Leonys Martin into the U.S.

The court found Estrada guilty of three counts of bringing Jose Abreu, Omar Luis and Dalier Hinojosa into the U.S. illegally. The conspiracy involved fraud, as the U.S. embargo of Cuba and immigration laws meant the players had to be moved through a third country, such as Mexico or the Dominican Republic, to make the players eligible to sign as a free agent with U.S. teams. According to the Herald, Hernandez and Estrada deceived the U.S. government into granting visas and other documents for two dozen players.

In exchange, the men would take a percentage of the players' lucrative contracts.

"The truth is, these defendants received about $20 million on contracts worth $230 million," Assistant U.S. Attorney Ron Davidson said (via the Herald). "The truth is, these defendants corrupted young men."

Hernandez's attorney, Jeffrey Marcus, argued the players benefited by being brought to the U.S.

"The biggest beneficiaries are the players themselves," Marcus said. "They're all here, and they're living their version of the American Dream."

Abreu, the 2014 AL Rookie of the Year who has had more than 25 home runs and 100 RBIs in all four of his MLB seasons, testified on Estrada's behalf during the trial. He was best man at Estrada's wedding.

However, according to the Herald another player's wife testified that she had been told her husband would be chopped up and sent to her in a box if he left Mexico to sign with another representative.