Chicago built a three-run lead at PNC Park only to lose it in the fourth inning when the Pirates hit back-to-back-to-back home runs for the first time in 58 years.

But a two-run homer in the seventh off the bat of Anthony Rizzo put the Cubs up 5-4 which would stand as the runs necessary for a victory.

Like Thursday the Cubs took a 1-0 lead in the second when Nate Schierholtz worked a leadoff walk from Pittsburgh starter Charlie Morton. Darwin Barney hit into a fielder’s choice with Schierholtz on third and Brian Bogusevic on first to score Schierholtz.

Bogusevic found his way into the action again when he hit a two-run home run in the fourth inning a shot to center field that put Chicago up 3-0.

Through the first three innings Chicago starter Jake Arrieta was rolling. After he issued a leadoff walk to Jose Tabata and a single by Andrew McCutchen in the first Arrieta retired the next 10 batters he faced.

“Command was pretty good for me” Arrieta said. “The one walk was to the first guy I think overall I threw the ball pretty well.”

But the Pirates stormed back in the fourth starting with an inside-the-park home run from Pedro Alvarez with two outs. Russell Martin followed with a solo shot to left and Garrett Jones homered to center to tie the game at 3.