NASHVILLE, Tenn. (AP) Joe Maddon thought back to 2002, when he was the Angels' bench coach and John Lackey, a 24-year-old rookie, beat the San Francisco Giants in Game 7 of the World Series.

''He actually helped pay for my daughter's wedding,'' Maddon said. ''I was really grateful for many years for that.''

In a deal that reunites the pair, Lackey and the Chicago Cubs finalized a $32 million, two-year contract Tuesday.

More from FoxSports

Now 37, Lackey will slot behind NL Cy Young Award winner Jake Arrieta and Jon Lester in the rotation as the Cubs seek their first World Series title since 1908.

''You walk into a three-game series, and the other team calls for your pitching, and you say it's going to be Lester, Arrieta and Lackey. They don't like that,'' Maddon said.

Lackey gets a $7 million signing bonus, of which $2 million is payable on Dec. 22 and the rest on Jan. 16, 2017. He receives salaries of $12.5 million a season.

He went 13-10 with a 2.77 ERA in 33 starts for NL Central champion St. Louis and started Game 4 of the NL Division Series at Wrigley Field, lasting just three innings in a season-ending 6-4 loss to Chicago.

''I really believe that the particular kind of edge that John provides is really going to be helpful for us moving forward,'' Maddon said. ''I like the idea of coming off the kind of year that we had to really add this kind of a personality to the group.''

The move reunites Lackey with Lester and catcher David Ross, all part of Boston's 2013 World Series champions. Cubs president of baseball operations Theo Epstein was the general manager in Boston when Lackey signed an $82.5 million, five-year contract with the Red Sox as a free agent before the 2010 season.

Chicago, which announced the deal Tuesday, forfeits its first pick in June's amateur draft, the 28th overall. St. Louis gains a compensation-round pick.