NEW YORK -- The Yankees spent much of 2013 scouting right-hander Masahiro Tanaka in Japan. After seeing him go 24-0 with a 1.27 ERA, they came away convinced his stuff would translate to the major leagues.

On Wednesday, before Tanaka had thrown a major league pitch, they confirmed their conviction by signing the 25-year-old starter to a seven-year contract. Tanaka's deal is worth $155 million, his agent, Casey Close, confirmed to ESPNNewYork.com.

The contract includes an opt-out clause after the fourth year. The Yankees will pay Tanaka's Japanese team, the Rakuten Golden Eagles, a $20 million posting fee.

The Yankees' offseason plan since the beginning of their organizational meetings in October was to go on a spending spree while trying to drop payroll beneath the $189 million tax threshold for 2014. The Yankees have spent $491 million, which includes $153 million for Jacoby Ellsbury, $100 million (including his option) for Brian McCann and $45 million for Carlos Beltran.

"We're going to do what we've got to do to win," Yankees co-chairman Hank Steinbrenner, who is not as involved in day-to-day operations as his brother, Hal, told The Associated Press in a telephone interview.

The Yankees are over the $189 million mark, which means they will be taxed at a 50 percent rate in the future. They had hoped to slip under the number to reduce their tax rate to 12.5 percent.

"This is an exclamation point that's been made today that our work was not complete or finished in terms of trying to put in a team that people could at least talk about having a shot to take a run at qualifying for the playoffs and playing into October," Yankees general manager Brian Cashman said.

Cashman said it is not realistic to think there will be anymore "heavy lifting" that can take place, but quickly added they will still look to improve themselves in a much "cheaper" way the rest of the winter. He said he expects David Robertson to be the team's closer.

Cashman said the Yankees have been scouting Tanaka since 2007. They paid close attention to him during the 2009 World Baseball Classic. In 2013, the Yankees had scouts at 15 of his games.

"We made a determined effort to know as much as they possibly could," said Cashman, who later admitted there are no guarantees on success, noting Japanese starters pitch on seven days' rest and use a different-sized ball.

Cashman said during the summer the Yankees made a video to try to lure Tanaka, which includedan appearance from Hideki Matsui.

"We put together a video about our ballpark, kind of an 'MTV Cribs'-type situation," Cashman said.

Ultimately, Cashman said Close told him the Yanks provided the highest offer, but others were in the vicinity. Before that, Cashman said he was in the dark, because Close kept all the information private.

The team badly wanted Tanaka and made it clear to him during a meeting two weeks ago. On Jan. 8, according to sources, the Yankees sent an eight-man group to Los Angeles to meet with Tanaka and Close. President Randy Levine, Cashman, assistant GMs Billy Eppler and Jean Afterman, manager Joe Girardi, pitching coach Larry Rothschild, former Japanese manager Trey Hillman (a special assistant to Cashman) and translator George Rose were present.

"They sold him on the Yankees," a source told ESPNNewYork.com. "That it was the right place to play and that big-game players play there."

The Yankees knew they needed Tanaka because of questions surrounding their pitching staff. CC Sabathia will try to regain his ace form. Hiroki Kuroda, who turns 39 before spring training, will attempt to show his struggles in the season's final six weeks were a mirage. No. 3 starter Ivan Nova will need to be consistent for a full season.

The fifth starter spot will be a competition between Michael Pineda, Vidal Nuno and David Phelps.

The Yankees decided to revamp the team after missing the playoffs for just the second time since 1995. Their top targets were Tanaka, Robinson Cano, McCann and Beltran. They also liked Ellsbury and Shin-Soo Choo. They have now signed Tanaka, McCann and Beltran, and replaced Cano's bat with Ellsbury's. Cano went to the Seattle Mariners for $240 million.