PHOENIX — Joc Pederson and Christian Walker both had two RBIs, and the Arizona Diamondbacks avoided a three-game sweep by beating the Detroit Tigers 6-4 on Sunday.
The D-backs scratched across two runs in the seventh to break a 4-all tie.
Randal Grichuk scored on a weak groundout by Pavin Smith after catcher Jake Rogers couldn't handle a bouncing throw from shortstop Javier Báez, who had trouble getting the ball out of his glove. Christian Walker came home one batter later on another soft grounder by rookie Blaze Alexander.
The D-backs finished their homestand 3-3. The defending National League champions have struggled with consistency this season and have a 22-25 record.
''This team's grinding right now, it's not a mystery. We're grinding hard,'' D-backs manager Torey Lovullo said. ''But they're fighting and they got a big win on a getaway day and I'm proud of them for that.''
Detroit squandered an opportunity in the eighth with runners on second and third and one out when Ryan Thompson (2-1) struck out Matt Vierling and Gio Urshela.
D-backs closer Paul Sewald retired the Tigers in order in the ninth for his third save.
Tigers pinch-hitter Kerry Carpenter had a two-out, RBI triple high off the center-field wall that tied the score in the seventh. Carpenter tried for the inside-the-park homer, but Tucker Barnhart tagged Carpenter just before the runner could get a hand on home plate, taking the relay from shortstop Kevin Newman after Smith's throw from right.