Friday's game lacked the opportunity for the Pirates to go to town on the San Francisco Giants' middle relievers like they did Thursday. If they were to accomplish anything they'd have to do so against Madison Bumgarner. Once Bumgarner takes the mound he doesn't leave for a while. Friday's game had that scent about it. For six innings Bumgarner controlled the Pirates. He allowed four singles and a walk and only one runner reached second base. Then Clint Barmes upended Bumgarner's night. Barmes' three-run home run in the seventh inning gave the Pirates a 3-1 win against the Giants at AT&T Park Friday night and for one more day at least kept them in front of the St. Louis Cardinals in the division. "Gave us the lead and I was really happy for him to see him put that swing on that" Charlie Morton said. The Pirates won for the fourth time in their past five games coinciding with the start of their west coast road trip. Gaby Sanchez and Josh Harrison both singled in the seventh. Neil Walker who entered the game with a .490 on-base plus slugging percentage batting right-handed bunted against the lefty Bumgarner for the second time in the game. It didn't matter because after Barmes' homer every base became scoring position. Barmes somehow golfed a 1-1 slider over the wall in left field for his fourth home run. "Thing of beauty" Morton said. "It was awesome." "I was able to barrel it" Barmes said. "I'll take it every time. It wasn't a bad pitch by any means." In addition to Bumgarner Barmes has homered against Stephen Strasburg Matt Harvey and Lance Lynn this season. "I wish I could explain that a little better" Barmes said. "I may have a few more homers if I could." Bumgarner pitched five innings in his most recent start. A rain delay in the start before that prematurely ended his day at four innings. In 10 starts from June 14 to Aug. 7 Bumgarner pitched at least seven innings each time out. He has gone seven in 15 of his 25 starts. That didn't change Friday. Bumgarner (11-8) completed eight innings and allowed seven hits. "A nice piece of work from us to score three in a game that we hadn't hit a lot of balls hard off Madison" manager Clint Hurdle said. "He was pitching very very well." Morton lacked a track record of Bumgarner's caliber but had also pitched well entering his start Friday. He allowed two runs in each of his past three starts all of them at least six innings. Morton watched Bumgarner's performance Friday and matched it. He worked efficiently going right after hitters to force ground balls. In 7 2/3 innings Morton (5-3) allowed one run on seven hits and forced 12 groundouts compared to two flyouts. He walked only one batter and struck out three.