TAMPA, Fla.—Outfielder Brett Gardner and the New York Yankees have agreed to a contract that adds $52 million in guaranteed money from 2015-18.

The deal announced Sunday includes a team option for for 2019 that if exercised would make the new money $62.5 million over five seasons.

"It shows the level of confidence, belief and trust, and the type of player and person he is," Yankees general manager Brian Cashman said. "We're excited to know that he's going to be a part of this team going forward. We're a better team with Gardy on it, that's the bottom line. This is a good day for him, and we believe it makes the future for us better."

Gardner agreed last month to a $5.6 million, one-year contract and would have been eligible for free agency after the 2014 season. The new four-year contract includes a $2 million signing bonus payable next Jan. 15 and salaries of $12 million in 2015, $13 million in 2016, $12 million in 2017 and $11 million in 2018. The Yankees have a $12.5 million option for 2019 with a $2 million buyout.

Gardner would receive an additional $1 million payment if he's traded, a provision he can earn only once.

"Free agency is something that, it kind of intrigued me, but it also kind of scared me," Gardner said. "I've never been anywhere else. I love it here. I love putting on the pinstripes everyday."

Cashman said talks about the contract started at the winter meetings in December.

The Yankees are moving Gardner to left field this year after signing free agent center fielder Jacoby Ellsbury to a $153 million, seven-year contract in December.

Gardner did have questions in his mind about his Yankees' future after the Ellsbury acquisition.

"When they signed Jacoby, your name gets thrown out in the trade rumors and all that," Gardner said. "It's kind of annoying, really. I didn't want to get traded. I don't want to go anywhere else, and I let them know that."

The 30-year-old Gardner hit .273 last year with eight home runs, 52 RBIs and 24 stolen bases.

"I like what he brings," Cashman said. "The speed dynamic, the defense, and I think the offense is there as well."

Also, the Yankees agreed to a minor league contract with injured closer Andrew Bailey, who was with Boston last year and is coming back from right shoulder surgery last July.

Cashman said the right-hander might be able to join the team in August or September.

"When he is healthy, he's an exceptional reliever," Cashman said. "He's coming off of a shoulder surgery, so we're taking a flier. A low risk. If we can get a reward out of it, great. If not, it's one of those nothing ventured, nothing gained."

NOTES: Yankees manager Joe Girardi attended a meeting with MLB officials Joe Torre and Tony La Russa Saturday on topics including instant replay. Girardi said the Yankees' first instant replay test game will be March 6 against Philadelphia in Clearwater. "It opens up us to more to have to answer for, but I think it gives our game the opportunity to have more things decided on the field, which I think is a good thing," Girardi said. The Yankees plan to work on replay situations throughout spring training even if it's not a test game. "We'll probably practice with walkie talkies," Girardi said. ... New York OF Alfonso Soriano missed his fourth day due to the flu, but could do a light workout Monday.