Harrison Bader hit a tiebreaking homer leading off the sixth after Madison Bumgarner homered in the bottom of the fifth to tie the game, and the St. Louis Cardinals beat the San Francisco Giants 7-3
Sunday to gain ground again in the wild-card race.
Paul DeJong hit a solo homer in the fourth for the first St. Louis hit and Martinez followed with a drive to nearly the same spot over the left-field fence. It was the seventh time the Cardinals hit consecutive homers this year.
Luke Weaver (4-1) struck out nine over seven innings to just miss a third straight start with double-digit Ks, helping St. Louis move within three games of Colorado in the race for the NL's second wild card.
Bumgarner retired his first 11 batters before DeJong's 21st homer. The 2014 World Series MVP, who was scratched Thursday night with the flu, allowed five runs and five hits in six innings.
The Giants dropped their first series at home in the last seven, having won or split six in a row.