SAN FRANCISCO (AP) - The Giants have traded former closer Mark Melancon to the Atlanta Braves for right-handed reliever Daniel Winkler and a minor league pitcher.

Melancon signed a $62 million, four-year contract with San Francisco in December 2016 but didn't emerge as the dominant closer he had been in part because of injuries. He had just 15 saves in his two-plus seasons with the Giants.

In addition, San Francisco sent right-handed reliever Sam Dyson to the Twins and kept 2014 World Series MVP Madison Bumgarner.

The 34-year-old right-hander is 4-2 with a 3.50 ERA in 43 appearances and 46 1/3 innings this season.

When the Giants acquired him, Melancon had saved at least 30 games in three straight seasons, recording a majors-best 51 in 2015. He went 47 for 51 in save opportunities in 75 relief appearances last season with Pittsburgh and Washington,

Winkler is 3-1 with a 4.98 ERA in 27 appearances this season. The Giants also received Class A pitcher Tristan Beck.