PITTSBURGH (AP) J.A. Happ allowed two hits in six shutout innings and the Pittsburgh Pirates made quick work of the Arizona Diamondbacks, 4-1 on Wednesday night.

Happ (5-7), acquired at the trade deadline from Seattle, struck out three and walked two to earn his first National League victory in more than three years. Sean Rodriguez had three hits and an RBI for the Pirates. Starling Marte added two hits and Gregory Polanco chipped in an RBI single off Robbie Ray (3-9).

Mark Melancon struck out three straight batters in the ninth for his 38th save. Pittsburgh improved to 16-3 against teams from the NL West and is 57-31 since May 9, the best record in the majors.

More from FoxSports

Paul Goldschmidt had an RBI single in the ninth for Arizona but A.J. Pollock, Jarrod Saltalamacchia and David Peralta whiffed against Melancon while representing the tying run.

The Pirates kept up the crisp pace they have set over the last three-plus months in just innings, a welcome reprieve after needing 15 innings to shake the Diamondbacks in a 5-hour, 11-minute marathon on Tuesday night.

Pittsburgh acquired Happ to bolster a rotation that has slipped a bit in recent weeks. He's gotten better in each of his three starts since coming over, losing to the Cubs on Aug. 4, getting a no-decision against the New York Mets on Friday before completely shutting down Arizona.

The Diamondbacks have played well of late and averaged 6.6 runs in their last nine games. The closest they got to a significant threat against Happ came when he issued consecutive walks to start the second inning. A double play and a harmless grounder later, Happ was out of trouble and on his way. He retired 14 of the final 16 batters he faced before being taken out after just 83 pitches.

Ray remained winless since July 7, dropping his fifth straight decision even though the Pirates failed to hit a home run for the first time in 13 games. Jung Ho Kang raced home on a wild pitch in the second, Rodriguez followed with a run-scoring single and Polanco forced Happ - who reached on a fielder's choice - to chug 270 feet from first to home after Polanco hit a slicing double to the gap in left-center.

It was enough as Melancon bounced back after blowing his first save in more than three months.

HERO'S GOODBYE?

Pirates SS Pedro Florimon picked up the first walkoff win of his career on Tuesday night, smacking a triple off the wall in right field to score Francisco Cervelli and lift Pittsburgh to a 9-8 win. He received the customary cream pie to the face from A.J. Burnett, a celebration that also doubled as a goodbye party.

The Pirates designated Florimon for assignment on Wednesday afternoon and called up reliever Josh Wall to help out a depleted bullpen. Even with the heroics Florimon hit just .105 in 15 games with Pittsburgh. Manager Clint Hurdle, however, praised Florimon's steady defense and the fact it was a difficult conversation to have.

ON THE MOVE

Arizona sent struggling RHP Chase Anderson to Triple-A Reno on Wednesday following another difficult start against Pittsburgh on Tuesday night. Anderson has lost four of five decisions while seeing his ERA rise to 4.51. The Diamondbacks called up RHP Zach Godley from Double-A Mobile.

The Pirates signed free agent outfielder Travis Snider on Wednesday and sent him to Triple-A Indianapolis. Pittsburgh traded Snider to Baltimore in the offseason, but Snider hit just .237 in 69 games with the Orioles before being released last week.

UP NEXT

Diamondbacks: Arizona heads to Cincinnati on Thursday for a four-game set with the Reds. Patrick Corbin (3-3, 3.43 ERA) gets the start. Corbin is 2-0 in his last four starts. The Diamondbacks won two of three from Cincinnati in Arizona earlier this month.

Pirates: Pittsburgh hosts San Francisco on Thursday, the beginning of a four-game series that marks the Giants' first visit to PNC Park since beating the Pirates 8-0 in the Wild Card game last October. Charlie Morton (7-4, 4.36 ERA) faces Jake Peavy (3-5, 4.18). Pittsburgh swept three games from the Giants in San Francisco in June.

---

Follow Will Graves at www.twitter.com/WillGravesAP