Major League Baseball has reached an agreement with Cuba’s Baseball Federation allowing Cuban players to sign with U.S. teams without needing to defect, MLB Deputy Commissioner Dan Halem told Reuters on Wednesday.

Under the deal, which marks a ray of light in fraught U.S.-Cuban relations, MLB teams will pay the Cuban Baseball Federation a percentage of the bonus awarded to a Cuban player, Halem said.

Cuban players older than age 25 or with six years of service in Cuban leagues will be free to sign with MLB teams, he added. Other players will have to seek permission first. If they defect they will need to face a waiting period of one to two years.

In the past, many Cuban players seeking riches in the big leagues have defected and undertaken dangerous journeys via human traffickers. In Cuba the basic salary for players is $50 per month.

“Our primary objective in this agreement is to provide players from Cuba a path to the major leagues without having to endure the hardships many of our players have already experienced,” Halem told Reuters.

Reporting by Daniel Trotta; Writing by Sarah Marsh; Editing by David Gregorio