SAN DIEGO — Outfielder Brett Gardner, the longest tenured Yankee and now the lone holdover from their last championship season, in 2009, is returning for his 13th major league season with the team. The deal, which both sides wanted, was completed on Thursday, with Gardner agreeing to a one-year contract that guarantees him $12.5 million.

Gardner will earn $8 million in salary plus a $2 million signing bonus next season, according to a person with direct knowledge of the deal who requested anonymity because it had not yet been announced. The deal also includes a $10 million option for the 2021 season with a $2.5 million buyout.

Returning for his 16th year in the organization, Gardner, 36, was drafted by the Yankees in 2005, reached the majors in 2008, won a World Series ring the next season and has been a team leader for many years. With the retirement of pitcher C.C. Sabathia, who also played on the 2009 Yankees, Gardner will continue to play an important leadership role in the clubhouse.

Not that he will not be valuable on the field, as well: He is a left-handed hitter in a lineup filled with right-handers and a capable center fielder, a position of need for the Yankees while Aaron Hicks recovers from Tommy John surgery, which may keep him out until the second half of the season.