The Cubs owned a 2-0 lead heading into the ninth, but the Giants scored three times in the top of the inning against Kyuji Fujikawa. Brandon Belt's two-run double highlighted the inning and put the Giants in position for what could have been their fifth straight victory.
After Romo retired the next two hitters, DeJesus reached on a single to center. Castro then drove a 2-1 pitch to deep center to end the Giants' winning streak.
Despite giving up the lead in the top of the ninth, Fujikawa (1-0) was credited with the win.