The Braves strengthened their bullpen Thursday by signing lefty Will Smith to a three-year contract.

Smith signed a three-year deal worth $39 million, with a club option for 2023 for another $13 million ($1 million buyout).

A 6-foot-5, 248-pound native of Newnan, Smith recorded 34 saves last season for the Giants and was chosen for the National League All-Star team. He was 6-0 with a 2.76 ERA in 63 appearances.

Smith struck out 96, walked 21 and held opponents to a .196 average. Lefties hit .157 against him. He logged a 42 percent ground-ball rate.

The Braves will introduce Smith at a news conference Nov. 19. General manager Alex Anthopoulos also will be present.

San Francisco surprised some when it opted to keep Smith beyond the trade deadline. The Giants, in the midst of a rebuild, went on a run before July 31 and chose to keep Smith and starter Madison Bumgarner.

While the Braves and Smith have long been connected, Thursday’s move came unexpectedly. The GM Meetings were wrapping up in Arizona, and Smith became the first major free agent to pick a team.

The urgency came largely because of Smith’s qualifying offer. The deadline to accept or reject the one-year, $17.8 million offer was 5 p.m. ET. Rather than take the padded short-term agreement, Smith found a multi-year home in the Braves.

The Braves forfeited their second-highest pick to sign Smith, who was one of eight players to decline a qualifying offer. The Braves could recoup a pick if third baseman Josh Donaldson departs - though the team has been clear it hopes to retain him. Donaldson rejected the offer before Thursday's deadline.

Anthopoulos indicated earlier this week that losing a draft pick - despite the team’s added emphasis on the domestic draft because of its international market limitations - wouldn’t preclude the team’s pursuit of a player it liked.

In Smith, the Braves sacrificed a pick to further fortify their bullpen. Smith adds another experienced closing option, joining veterans (and former All-Stars) Mark Melancon and Shane Greene. The team intends to use Melancon as its primary closer, though that’s always subject to change.

Smith, now 30, graduated from Northgate High School in Newnan before attending Gulf Coast Community College, from which the Dodgers drafted him in the seventh round of the 2008 draft. He made his major league debut in 2012 for the Royals.

Smith was a member of the Royals’ starting rotation as a rookie, making 16 starts in 2012. He started once among 19 appearances in 2013 and has been used out of the bullpen since then.

He was traded to Milwaukee in December 2013, and in 2014 made 78 appearances, which is still his career high. He recorded one save in 181 appearances for the Brewers before his trade to the Giants at the trade deadline in 2016.

The past two seasons, Smith saved 48 games for the Giants.