Cubs rally for 3 in 9th to complete sweep of Marlins

Matt Szczur #20 of the Chicago Cubs scores the game winning run against the Miami Marlins in the 9th inning as teammate Willson Contreras #40 yells at Wrigley Field on August 3, 2016 in Chicago, Illinois. The Cubs defeated the Marlins 5-4. (Photo by Jonathan Daniel/Getty Images)

Matt Szczur #20 of the Chicago Cubs scores the game winning run against the Miami Marlins in the 9th inning as teammate Willson Contreras #40 yells at Wrigley Field on August 3, 2016 in Chicago, Illinois. The Cubs defeated the Marlins 5-4. (Photo by Jonathan Daniel/Getty Images)

CHICAGO — The Chicago Cubs rallied for three runs in the bottom of the ninth inning — capped by a bases-loaded walk for a tie and a wild pitch to score the winning run — for a 5-4 victory over the Miami Marlins on Wednesday and a sweep of the three-game series.

Ben Zobrist drew a bases-loaded walk with two out to tie the score. With Willson Contreras at the plate, Marlins closer A.J. Ramos (1-1) threw a wild pitch to allow Matt Szczur to score the winning run from third base.

It was Ramos’ second blown save of the season in 33 chances.

Jeff Mathis hit a two-run home run, Christian Yelich homered and drove in a pair of runs and Tom Koehler tossed six strong innings to give the Marlins a 4-1 lead heading to the bottom of the eighth.

Justin Grimm (1-0) pitched the ninth inning for the win. Chicago has won seven of eight.