PHOENIX (AP) -- Drubbed their previous two games, the Florida Marlins needed a big lift from Anibal Sanchez .
He gave them two: an expected one from his arm, an unexpected one with his bat.
Sanchez ended a marvelous May by pitching eight effective innings and drove in two runs on chopping groundouts, helping the Marlins snap Arizona's seven-game winning streak with a 5-2 victory over the Diamondbacks on Tuesday night.
"He's been very consistent through the whole season so far and he did today what he's been doing lately," Marlins manager Edwin Rodriguez said.
Florida needed it.
After opening its seven-game road trip with a three-game sweep at San Francisco, the Marlins had lost three of four, including consecutive lopsided losses to the Dodgers and the Diamondbacks.
Sanchez did his part, allowing two runs and six hits while striking out eight to win his fifth straight decision. Logan Morrison and Gaby Sanchez hit solo homers and the Marlins took advantage of a shaky Ian Kennedy (6-2) to make the most of their seven hits.
Leo Nunez cleaned it all up, working a perfect ninth for his 19th save in 20 chances, helping Florida bounce back from a 15-4 loss in the series opener Monday night.
"It's just a good feeling to get a win after those last two," said Morrison, who has reached safely in all 32 games he's played this season, the longest active streak in the majors.
Arizona ended its magnificent May with a dud.
Kennedy had trouble locating his pitches in one of his shortest outings of the season and the offense had trouble locating Sanchez's changeup all night, leading to the Diamondbacks' third loss in 18 games. Justin Upton and Kelly Johnson hit solo homers, but Arizona had just four other hits after getting 19 the night before.
"We really had only two opportunities against him," Diamondbacks manager Kirk Gibson said of Sanchez. "He dealt with those situations really well."
Arizona had five homers while just missing the nine-inning team record for hits in the series opener. This one didn't figure to be as explosive. Not with Sanchez and Kennedy on the mound.
Sanchez was coming off his second complete game of the season, a five-hit shutout over San Francisco on Thursday to win his fourth straight decision.
Kennedy wasn't bad his last time out, either, holding Colorado to a run over eight innings on Wednesday in his fifth straight win.
Sanchez got off to a rocky start, giving up Upton's long solo homer in the first on an 0-1 pitch, then settled into a rhythm. He struck out the side in the fourth inning, then worked through a little traffic in the sixth and seventh before giving up Johnson's 10th homer in the eighth.
That part the Marlins could see coming.
The surprise came from Sanchez's bat.
A .079 hitter with four career RBIs, he drove in runs in the fourth and sixth innings. OK, so maybe they were high-bouncing choppers that led to easy outs, but he got the ball in play and the runs across the plate.
"When I'm hitting, I just try to hit the ball, put the ball in play," Sanchez said. "Because something could happen if I put the ball in play."
Kennedy was offkilter after cruising through the first inning, stranding runners in scoring position over the next two innings before really getting into trouble in the fourth.
The right-hander was knocked for two hits to open, then walked consecutive hitters to give Florida a run. Sanchez made it 2-1 with a groundout off the plate and Chris Coghlan was hit on the foot to load the bases, but Kennedy ended the inning by getting Omar Infante to ground out.
Kennedy's trouble didn't end there, though.
Morrison led off the fifth with his seventh homer, hitting a 1-2 fastball that was a little too close to the plate over the wall in center to make it 3-1.
Kennedy lasted five innings, giving up three runs and five hits, with three walks, a hit batter and two wild pitches.
"I feel like it was me that beat myself," Kennedy said after his shortest outing since lasting three innings in a loss to St. Louis on April 13. "I minimized the damage in those situations, but I want to go deeper in the game. It is frustrating when it is me that does it."
But Arizona's problems didn't end with him leaving.
Sanchez drove in another run on another chopping groundout in the sixth inning after Emilio Bonifacio singled and went from first to third on pitcher Esmerling Vasquez 's throwing error during a pickoff attempt.
Gaby Sanchez made it 5-1 with a solo homer off Aaron Heilman in the seventh, his ninth.
Notes: Hanley Ramirez , Florida's three-time All-Star shortstop, missed his second straight game after experiencing stiffness in his lower back against Los Angeles on Sunday. ... Johnson is 13 for 31 during a seven-game hitting streak, including nine extra-base hits.