The Dan Le Batard Show lays out the complicated issues surrounding the normalized relationship between MLB and Cuban players. (3:41)

HAVANA -- Major League Baseball, its players' association and the Cuban Baseball Federation reached an agreement that will allow players from the island to sign big league contracts without defecting, an effort to eliminate the dangerous trafficking that had gone on for decades.

The agreement, which runs through Oct. 31, 2021, allows Cubans to sign under rules similar to those for players under contract to clubs in Japan, South Korea and Taiwan.

"For years, Major League Baseball has been seeking to end the trafficking of baseball players from Cuba by criminal organizations by creating a safe and legal alternative for those players to sign with major league clubs," baseball Commissioner Rob Manfred said in a statement Wednesday. "We believe that this agreement accomplishes that objective and will allow the next generation of Cuban players to pursue their dream without enduring many of the hardships experienced by current and former Cuban players who have played Major League Baseball."

Depending on the quality of future players, the agreement could mean millions of dollars in future income for the cash-poor Cuban federation, which has seen the quality of players and facilities decline in recent years as talent went overseas.

The agreement marks a step forward in U.S.-Cuba relations during a time of tensions between Cuba and the Trump administration, which has pledged to undo President Barack Obama's 2014 opening with the island.

MLB said the deal was allowed by amendments to the Cuban Asset Control Regulations of March 16, 2016, that established the provisions of a general license from the U.S. Treasury Department's Office of Foreign Assets Control. The league said OFAC confirmed to Major League Baseball in a letter dated Sept. 20, 2016, that an agreement with the Cuban federation would be valid.

"Baseball has always been a bridge between our two nations, facilitating people-to-people connections and larger agreements that have brought our countries closer together," said Sen. Patrick Leahy, a Vermont Democrat.

Dodgers star Yasiel Puig, who was smuggled out of Cuba by traffickers linked to a Mexican drug gang, said "today is a day that I am extremely happy." Kevork Djansezian/Getty Images

Any disputes between MLB and the Cuban federation are subject to resolution by the International Chamber of Commerce.

"Establishing a safe, legal process for entry to our system is the most important step we can take to ending the exploitation and endangerment of Cuban players who pursue careers in Major League Baseball," union head Tony Clark said in a statement. "The safety and well-being of these young men remains our primary concern."

Only players under contract to the Cuban federation are covered by the agreement, and the Cuban federation agreed to release all players 25 and older with at least six years of professional experience. They would be classified as international professionals under MLB's labor contract with the players' association and not subject to international amateur signing bonus pools.

The Cuban federation may at its discretion release younger players to sign minor league contracts with MLB organizations.

A player can decide whether he wants a registered MLBPA agent to negotiate a major league contract. He may use a representative other than an agent to negotiate a minor league deal.

U.S. Sen. Jeff Flake, an Arizona Republic, called it a "homerun agreement," tweeting "This deal will make life better for Cuban baseball players, who will no longer have to risk unsafe passage to the U.S."

The State Department told ABC News it is "aware of an agreement to be signed in the coming days between" the MLB and Cuban Baseball Federation, referring to the MLB for further details.

"Cuban nationals, like nationals of other countries, may apply for visas at any US embassy or consulate around the world, but must be physically present in that country," a State Department official said in a statement.

Players have told stories of harrowing crossings on rafts and rickety boats -- some later challenged as exaggerations.

"Today is a day that I am extremely happy," said a statement from Los Angeles Dodgers outfielder Yasiel Puig, who was smuggled out of Cuba by traffickers linked to a Mexican drug gang, according to court testimony. "To know future Cuban players will not have to go through what we went through makes me so happy."

Cuban-born players have a long history in the major leaguers, led by Minnie Minoso with nine All-Star selections, Tony Oliva with eighth and Camilo Pascual and Tony Perez with seven each. And while Puig, Orlando and Livan Hernandez, Aroldis Chapman and others became stars in recent decades, others have been big-money busts. Outfielder Rusney Castillo agreed to a $72.5 million, seven-year contract with Boston in 2014 and has appeared in just 99 games with the Red Sox while playing 347 in the minor leagues.

"Words cannot fully express my heartfelt joy," Chicago White Sox All-Star first baseman Jose Abreu said in a statement. "Dealing with the exploitation of smugglers and unscrupulous agencies will finally come to an end for the Cuban baseball player. To this date, I am still harassed."

Any players allowed to sign with big league clubs can do so without leaving Cuba, and the fee paid by the signing team will be covered by the same rules as in MLB's other posting systems: 20 percent of the first $25 million of a major league contract, 17.5 percent of the next $25 million and 15 percent of any amount over $50 million. There will be a supplemental fee of 15 percent of any earned bonuses, salary escalators and exercised options.

For minor league contracts, the fee will be 25 percent of the signing bonus, and there will be a supplemental fee for any foreign professionals who at first agree to minor league deals that include major league terms that later come into force.

A former Cuban federation player under contract to a MLB club may return to Cuba during the offseason. He can play in Cuba during the offseason only with his MLB club's consent.

The departure of young Cuban players to MLB has slowed since limits were placed on signing bonuses for international amateurs starting July 2, 2017.

For 2017-18, outfielder Julio Pablo Martinez got $2.8 million from Texas, and the only other signing bonus over $300,000 for a Cuban-born amateur was $750,000 for shortstop Eddy Diaz (Colorado).

In the current signing period that started July 2, the largest signing bonus for a Cuban-born amateur has been $975,000 for outfielder Jairo Pomares with San Francisco.

The Associated Press contributed to this report.