PITTSBURGH (AP) Jeremy Hellickson won on the road for the first time in 2 1/2 months and Jake Lamb homered to lead the Arizona Diamondbacks to a 4-1 victory over the Pittsburgh Pirates on Monday night.

Hellickson (9-8) allowed one run and three hits in 5 1-3 innings while striking out four and walking one. He had gone 0-4 with an 8.67 ERA in his previous six road starts since winning May 30 at Milwaukee.

Lamb connected for his fifth home run in the fourth inning, a solo shot off Gerrit Cole (14-7) that put the Diamondbacks ahead 4-0 and helped snapped the National League wild card-leading Pirates' four-game winning streak.

More from FoxSports

David Peralta had two hits for the Diamondbacks, including an RBI double in a two-run first inning. He is hitting .469 (30 for 64) with 21 RBIs in his last 19 games.

Cole gave up four runs and nine hits in 6 2-3 innings with one walk and five strikeouts. He entered August leading the majors in wins but is 0-3 with a 4.70 ERA in four starts during the month.

Cole's four starts without a win matches the longest drought of his three-year career, from April 15-May 2, 2014.

The Pirates had their lead in the wild-card race cut to two games over the idle Chicago Cubs. The Diamondbacks improved to 14-8 in their last 22 games.

Brad Ziegler pitched a scoreless ninth for his 21st save.

Pedro Alvarez accounted for the Pirates' lone run with his 19th homer in the fifth inning. He had two hits.

The Diamondbacks jumped on Cole for two runs in the first. A.J. Pollock tripled with one out and scored on Peralta's double before Welington Castillo capped the inning with an RBI single.

Chris Owings hit a leadoff double in the second and scored on a single by Hellickson to push the lead to 3-0.

TRAINER'S ROOM

Diamondbacks: RHP Randall Delgado was activated from the 15-day disabled list after being out since July 28 with a sprained right ankle. He retired both batters he faced in the sixth inning in relief of Hellickson. INF/OF Jamie Romak was optioned to Triple-A Reno.

Pirates: 1B/OF Corey Hart, who has been on the disabled list since June 22 with a left shoulder impingement and right knee discomfort, is scheduled to begin a second rehab assignment Thursday with Triple-A Indianapolis. He was with Indianapolis from June 30-July 11 before experiencing a setback.

CLEANING UP

Peralta has proven to be an effective cleanup hitter, batting behind All-Star first baseman Paul Goldschmidt in the Diamondbacks' lineup. Peralta has a .340 batting average in 191 at-bats as the cleanup hitter, compared to .262 in his other 141 at-bats.

MILESTONE HOMER

Alvarez's home run was the 1,000th hit by the Pirates at PNC Park, which opened in 2001. His 58 career homers at PNC Park are third behind Andrew McCutchen's 70 and Jason Bay's 61.

UP NEXT

Diamondbacks: RHP Chase Anderson (5-5, 4.31 ERA) starts Tuesday night after losing his previous start last Wednesday against Philadelphia, when he allowed five runs in five innings.

Pirates: LHP Francisco Liriano (8-6, 3.19 ERA) is 4-0 with a 3.06 ERA in eight starts since his last loss June 20 at Washington.