Japanese pitcher Masahiro Tanaka and the New York Yankees agreed to a seven-year, $155 million contract.

The 25-year-old right-hander narrowed his choice to the Yankees and Los Angeles Dodgers, who were offering more overall money but not an opt-out clause. His contract with the Yankees includes an escape clause after four years.

The Yankees also have a $20 million bill for negotiating rights due to the Rakuten Golden Eagles, Tanaka's home team in Japan.

In terms of length and total potential earnings, Tanaka's deal is the fifth-richest for starting pitchers behind Dodgers left-hander Clayton Kershaw ($215 million), Detroit Tigers right-hander Justin Verlander ($180 million), Felix Hernandez ($175 million) of the Seattle Mariners, and Yankees left-hander CC Sabathia ($161 million).

Tanaka had a 99-35 record with a 2.30 ERA and 1,238 career strikeouts. He's lauded for his fiery edge and teammates in Japan said he is likely to be more successful than pitchers who entered Major League Baseball from Japan in the past because of that competitive nature.

In total, the Yankees' $175 million tab for Tanaka is a record for a free agent pitcher. With his contract on the books, Tanaka pushes the Yankees payroll over $200 million for next season.

To make room on the 40-man roster, the Yankees designated left-handed pitcher David Huff for assignment.

--The Oakland Athletics signed free-agent reliever Eric O'Flaherty to a two-year, $7 million contract, FOX Sports reported.

Performance bonuses could boost the contract's value to near $10 million, according to the report.

O'Flaherty, 28, is not expected to be ready to pitch until July after undergoing Tommy John reconstructive elbow surgery, but he is considered one of the better relievers in baseball. From 2009 until 2012, the left-hander posted a 1.95 ERA with the Atlanta Braves in 231 1/3 innings.

--The Tampa Bay Rays acquired infielder Logan Forsythe in a seven-player trade with the San Diego Padres.

The Rays also landed right-handed pitcher Brad Boxberger, right-handed pitchers Matt Andriese and Matt Lollis and infielder Maxx Tissenbaum from the Padres in exchange for left-handed pitcher Alex Torres and right-hander Jesse Hahn.

--St. Louis Cardinals minor league right-handed pitcher Andrew Pierce received a 50-game suspension without pay after testing positive for an amphetamine, the Office of the Commissioner of Baseball announced.

The suspension of Pierce, who is currently on the roster of the Class A State College Spikes of the New York-Penn League, will be effective at the start of the 2014 New York-Penn League season.