CHICAGO -- By any definition, catching 14 innings qualifies as a long day. Buster Posey is glad it wasn't even longer.

"I'm happy we were able to end the game when we did," Posey said after the San Francisco Giants salvaged a split Thursday night with a 5-3 comeback victory over the Chicago Cubs in the regularly-scheduled game.

"With the delay and the chance for more rain, it could have been even longer."

In the resumption of the game suspended Tuesday following the Wrigley Field tarp fiasco -- the start of which was delayed nearly two hours by rain -- the Cubs held on for a 2-1 win (they began with a 2-0 lead) despite not getting a hit during in the four innings they batted.

Posey went 4-for-4 with a homer and a walk in the nightcap, a day after sitting out with a sore right hip.

"Having yesterday to kind of reboot definitely helped," he said.

Third baseman Sandoval went 3-for-4 with two doubles and two RBIs.

Giants starter Madison Bumgarner shook off a shaky beginning to toss seven solid innings. Bumgarner (14-9) allowed three runs on seven hits with 12 strikeouts. All of the runs came in the first inning -- on back-to-back homers from right fielder Justin Ruggiano and catcher Welington Castillo -- and the left-hander settled down from there.

Bumgarner retired 10 of 11 batters before third baseman Luis Valbuena led off the seventh with a single. Center fielder Matt Szczur followed with a single -- his first major league hit -- to put the potential tying run on base.

Bumgarner, though, struck out left fielder Chris Coghlan and got second baseman Arismendy Alcantara to ground out to third, with both runners moving up a base.

That brought up shortstop Javier Baez with a chance to tie the game with a single. Bumgarner struck out Baez for the fourth time, getting the rookie to chase a high fastball up and out of the strike zone to end the threat.

"What a gutty effort that last inning," Giants manager Bruce Bochy said. "He had to find a way to get through it and he did. He's our guy and he got a big strikeout there."

Of course, it helped that he had a free-swinger eager to chase at the plate for the final out.

"As he starts to understand they're not going to go away from staying to his weaknesses, which is at this point, elevated him out of the zone in certain instances," Cubs manager Rick Renteria said of Baez. "He is certainly trying to make adjustments. It's just a matter of re-zoning and getting pitches in his hitting area that he can do some damage with."

After Javier Lopez and Sergio Romo combined to throw a scoreless eighth inning, Giants closer Santiago Casilla pitched the ninth to earn his 11th save in 14 chances.

Cubs left-hander Travis Wood (7-11) gave up four runs on eight hits in six innings.

After the Giants fell behind 3-1, Sandoval and Bumgarner each drove in a run to tie it. Posey led off the fifth inning with a homer to give San Francisco a 4-3 lead.

The Giants tried to rally in the completion of the suspended game -- which was delayed a total of 6 hours, 31 minutes -- but center fielder Angel Pagan's hard grounder up the middle (with two runners on) was knocked down by Hector Rondon, who recovered to pick up the ball and throw to first for his 19th save.

The Giants won two of the three games in the series.

"You'll take it," Bochy said. "It would have been nice to come back, sure. We tried, but we came up a little short. Still, to get the series ... it was a tough series with the delays. These guys fought."

NOTES: Before the resumption of the suspended game, the Cubs placed SS Starlin Castro on the bereavement list and RHP Edwin Jackson (right lat strain) on the 15-day disabled list. Chicago recalled INF Logan Watkins and LHP Zac Rosscup from Triple-A Iowa. Stays on the bereavement list are a minimum of three days and a maximum of seven. ... After sitting out Wednesday night with a sore right hip, Giants C Buster Posey was back in the lineup for the suspended game. ... While Castro is away, Javier Baez will shift from second to shortstop. Baez played short throughout his minor league career before making the shift to second in the middle of this season. ... Giants C Hector Sanchez, who sustained a second concussion after being hit with a foul tip during a rehab assignment last weekend, was advised to take three weeks off with no baseball activity.