After more than two years of negotiating, Major League Baseball and the Cuban Baseball Federation have struck a deal that would allow Cuban players to join major league organizations without defecting, though the agreement could be scuttled if Trump administration officials roll back Obama-era provisions that paved the way for the historic pact, sources familiar with the situation told Yahoo Sports.

The deal, which is expected to be announced Wednesday afternoon, aims to end the trafficking of players by smugglers – situations that have led to players being kidnapped, threatened and extorted. Players would come to the United States on work visas, and teams would pay the CBF, a nongovernmental organization that runs pro baseball in Cuba, for the release of their rights, according to sources.

Similar agreements exist in Japan, Korea and Taiwan. In the deal with Cuba, which runs through 2021, players who are 25 years old would receive a mandatory release, allowing them to come to the U.S. Younger players would be released at the CBF’s discretion, sources said.

Major league teams would pay a release fee on top of the money owed a player. For those under 25, the fee would be 25 percent, and only the money paid to the players would count against the team’s international signing-bonus pool. For those 25 and over, who are considered professionals, the fee would be on a sliding scale between 15 and 20 percent.

In cases where players still defect, sources said, there will be a mandatory waiting period until they sign. The 25-and-over professionals would need to wait until the next free-agent signing period, which starts about a week after the World Series end. The penalty is far harsher for younger players: They would wait until July 2 after a defection, according to sources. Should a 16-year-old defect in June 2019, he could sign July 2, 2020. If he were to defect in August 2019, though, he wouldn’t be eligible to sign until July 2, 2021, under the agreement’s rules.

The frightening stories of Cuban defectors – from the kidnapping of Leonys Martin to José Abreu eating a fake passport to the conviction of agent Bart Hernández on smuggling charges – showcase perhaps the ugliest side of MLB. With the Obama Administration loosening restrictions on business in Cuba, MLB engaged the CBF in hopes of stemming the abuse of Cubans who simply want to play baseball.

Meanwhile, the league’s work in Washington, D.C., showed the importance of a deal with Cuba. MLB spent $1.32 million lobbying last year and $999,000 through the third quarter this year on matters dealing with Cuba, according to financial-disclosure documents. While there is significant support for the agreement among players and others who have long hoped to see Cuban baseball find its rightful place in the heart of MLB, government hardliners – and expats who believe any deal with Cuba is wrong – could pressure MLB to abandon it.

Despite years of lobbying and negotiating, MLB remains unsure how much, if any, pressure the government wants to exert. The hope, according to sources, is that the mission of the deal – to make the path safer for players – outweighs any concerns from the National Security Council or other governmental entities that could oppose the deal.

Should the government choose not to intervene, players could begin coming to MLB as soon as today, according to sources. Further, it could pave the way for Cubans in the U.S. already to potentially join the country’s World Baseball Classic team when the tournament returns in 2021.

More from Yahoo Sports:

• President Trump has to sell his Tebow helmet

• The 10 biggest NFL Pro Bowl snubs

• 5-star spurns Alabama, flips back to Michigan

• Haynes: Kings star says he’s ‘fastest’ in the NBA

