Jason Heyward tied it with a single in the ninth inning and his liner to left-center in the 13th won it as the Chicago Cubs beat the San Francisco Giants 3-2 on Sunday to take three of four games in a possible playoff preview.
Anthony Rizzo led off the 13th with a single off Matt Reynolds (0-1) and went to second on Ben Zobrist's sacrifice. Addison Russell, who had three hits, was walked intentionally before Heyward drove in his third run of the game.
Trevor Cahill (4-4) worked a perfect inning in a series in which all four games were decided by one run.
The Cubs were staring at a second straight loss when Russell led off the ninth with a double against Santiago Casilla. He went to third on a wild pitch and scored on Heyward's single up the middle to hand Casilla his seventh blown save.