Pirates rookie pitcher Gerrit Cole had won his first four starts but hit a few snags in the past month as he had won just once in his last seven starts leading up to Friday's game against the Diamondbacks.

Cole who got a few extra days rest after his last start rediscovered his winning ways as he scattered five hits and two runs over six innings and led the Pirates to a 6-2 win over the Diamondbacks before a crowd of 39091 at PNC Park.

It was an important bounce back outing for Cole (6-5) who had won only once since June as well as the Pirates (72-49) who were coming off a 1-5 road trip.

The Pirates were able to extend their lead in the National League Central to three games over St. Louis (69-52) who lost to Chicago 7-0.

Cole had good command for the most part early in the game but he ran into some trouble in the top of the fourth inning and not surprisingly the trouble began when he got a little bit wild and struggled to throw strikes.

Adam Eaton led off the inning by flying out to left fielder Starling Marte but Cole walked the next two batters hitter Paul Goldschmidt and Aaron Hill and the two advanced to second and third on a wild pitch.

Martin Prado then singled to drive in Goldschmidt and that set the Diamondbacks up with first and third and one out.

Cole then struck out Wil Nieves but A.J. Pollock tied the game with a two-out single that brought Hill home.

That was really the only jam that Cole had to find his way out of as he did a good job of working fast and throwing strikes. Cole who threw 63 of his 98 pitches for strikes went six innings allowed only five hits two runs (both earned) and he struck out five and walked only two.

The Pirates grabbed a 2-0 lead the inning before thanks to a two-out RBI single by Pedro Alvarez that drove home Neil Walker and Andrew McCutchen.