Cuban outfielder Yoenis Cespedes has agreed to a four-year, $36 million deal with the Oakland Athletics.

The Miami Marlins also bid $36 million for Cespedes. But their offer was over six years, not four, one source familiar with the Cespedes negotiations told ESPN.com's Jayson Stark. The Marlins weren't interested in a deal shorter than six years, an executive who spoke with the team told ESPN.com.

Cespedes can sign Monday after receiving his unblocking license from the U.S. Treasury Department's Office of Foreign Assets Control, his agent, Adam Katz, told ESPN.com's Stark.

The outfielder needed the clearance because he is a Cuban national who has established residency in another country after defecting.

"At the end of the day with all these big free agents, it comes down to the total package," Katz said. "Sure, money and the economic package had something to do with it. But it's also about all the surrounding circumstances. And basically, this was a player who felt like this club wanted him more than anybody else."

Once Cespedes receives his worker's visa he is free to show up for spring training and play for the A's.

The contract allows him to become a free agent after the fourth year instead of having to wait six, Katz said.

Cespedes will receive $6.5 million in his first year, $8.5 million in his second year and $10.5 million in each of the last two years of the deal.

The deal would make the 26-year-old Cespedes the highest-paid player on Oakland's roster this season before he plays a major league game. The next-highest salary belongs to outfielder Coco Crisp at $6 million.

Cespedes, who is tied with Fernando Despaigne for the Cuban League's single-season home run record with 32, established legal residency in the Dominican Republic last month after saying six other major league teams were interested in signing him.

Cespedes met with the Marlins and toured their new ballpark last week.

"You don't land everybody you want to land. But I think we've been aggressive," Marlins president of baseball operations Larry Beinfest said. "We're really happy with the way the club looks. You always have a sense of disappointment when you're trying to either trade for or sign a player. It's not the first time and won't be the last. We would certainly wish him well."

Cespedes played for Cuba in the 2009 World Baseball Classic and is projected to be ready for the majors.

The other teams Cespedes said he drew interest from were the Baltimore Orioles, Detroit Tigers, Cleveland Indians and the Chicago Cubs and White Sox. The Athletics were never mentioned.

The agreement comes a week after the Athletics said they were extending the contracts of general manager Billy Beane and president Michael Crowley through the 2019 season.

The franchise has been seeking approval from Major League Baseball to move to the South Bay, where the San Francisco Giants hold territorial rights to the technology-rich region filled with fans and corporate dollars.

The A's, who open the season early against the Seattle Mariners in Japan on March 28, are hoping for a resolution to the long-standing dispute soon.

Information from ESPN.com senior writer Jayson Stark, ESPN The Magazine senior writer Buster Olney and The Associated Press was used in this report.