PHOENIX -- The offense finally had a good night. So did the bullpen.
That combination for the Pirates was enough to overcome the early departure of starter Wandy Rodriguez as Pittsburgh snapped a five-game losing streak by beating the Arizona Diamondbacks 5-3 on Monday.
McCutchen doubled in a run in a three-run first inning and broke a 3-all tie with his sacrifice fly after Starling Marte's leadoff triple in the fifth.
"It's good, man," McCutchen said. "We're a ballclub that's capable of doing that. Once we get going, we'll get going. We got on the board early, we fizzled out a little bit, then we got an extra run. We're still capable of doing more, but this is a good start."
Marte, who was 2 for 4 with two runs, and McCutchen make for an exciting pair, manager Clint Hurdle said.
"They're fun to watch at the plate," he said, "and they're fun to watch on the bases."
Jeanmar Gomez (1-0) got the victory in relief of Rodriguez, who left after 2 1/3 innings because of tightness in his left hamstring.
Trevor Cahill (0-2) allowed four runs and four hits in five innings for the Diamondbacks, who had won four in a row and were coming off a three-game sweep at Milwaukee.
"He didn't throw the ball where he wanted to at all," Arizona manager Kirk Gibson said. "He walked a couple of guys, he hit a guy, he was behind. The triple that Marte got was a 2-0 pitch. He didn't throw the ball good at all, not hitting his location, so they got on us. We can't score five runs every night."
Alfredo Marte drove in a run for Arizona with his first major league hit.
Jason Grilli pitched a scoreless ninth for his second save.
Arizona's Paul Goldschmidt had a sacrifice fly, giving him an RBI in a career-best five straight games, but the Diamondbacks didn't get a hit in the last five innings. Justin Wilson threw three innings of hitless relief before Mark Melancon and Grilli closed it out.
Wilson was the most impressive.
"Prado-Hill-Goldschmidt, that's a litmus test for any left-hander," Hurdle said. "That's the most velocity I've seen him have and his breaking ball was good. He's going 98 (mph), 79 (mph), and throwing strikes. Not a single three-ball count."
The Pirates, who hadn't won since opening day, got to Cahill in a hurry.
Starling Marte opened the game with a single, then scored when McCutchen doubled down the left-field line. With two outs, Cahill walked Russell Martin and Pedro Alvarez to load the bases, and Snider followed with a two-run single.
Arizona got one back when Goldschmidt doubled to deep left and scored on Wil Nieves' two-out single.
Two unearned runs for the Diamondbacks tied it at 3 in the third.
Gerardo Parra reached on an error by Alvarez at third base for running in front of shortstop Clint Barmes, impeding his ability to field the ball. That's when Pirates trainers rushed to the mound and, after trying to stretch and throwing a practice pitch, Rodriguez left the game and Gomez came in.
Rodriguez said he felt the hamstring tighten up on his next-to-last pitch to Parra.
"The next pitch I threw was a breaking ball and I felt it," Rodriguez said. "I told my trainer and the manager that I want to go out because I wanted to protect my next start."
Rodriguez said it's too soon to say whether he will be able to take his next scheduled turn.
Martin Prado singled and Aaron Hill walked to load the bases for Goldschmidt, who narrowly missed a grand slam on a deep drive to left for a sacrifice fly. With two outs, Alfredo Marte drove in the tying run with a single.
The Pirates, who entered with a .119 batting average in their first six games, went back up 4-3 in the fifth when Starling Marte tripled into the left-field corner and scored on McCutchen's sacrifice fly.
Jones' solo home run to right on a 2-2 pitch from Josh Collmenter in the eighth made it 5-3.
Pittsburgh batters struck out 12 times.
With a storm front moving through the area, the roof at Chase Field was closed. ... Alfredo Marte's hit came in his seventh at-bat. ... In the second game of the series Tuesday night, the Pirates send RHP James McDonald (0-1) to the mound against RHP Brandon McCarthy (0-0). ... Pittsburgh had not scored more than three runs in any of its first six games and managed just two runs total while being swept by the Dodgers in Los Angeles last weekend. ... Arizona LHP Matt Reynolds has allowed one hit in five scoreless innings this season. ... The Pirates homered for the second straight game after hitting none in their first five.