PHOENIX — Nick Ahmed smacked the ball down the left-field line and was running hard from the moment he left the batter's box. When Cincinnati's Josh VanMeter slightly misplayed the ball in the corner, the Arizona shortstop accelerated around second and slid into third with a triple.

He would be the Diamondbacks' only baserunner of the game.

His hustle would be enough for the team to get a much-needed win.

Jarrod Dyson drove home Ahmed with a sacrifice fly , Merrill Kelly threw seven scoreless innings and the Diamondbacks snapped a six-game losing streak with a 1-0 win over the Reds in a strange game on Saturday night.

"You never know if it's the first inning or last inning or anywhere in between, where something little like that can make a huge difference in the game," Ahmed said. "That's what everyone does in here. We play the game hard every single out, every single pitch."

The right-handed Kelly (11-14) had a third straight solid start. He gave up three hits, two walks and struck out five.

His spot in the rotation was in jeopardy just a few weeks ago after a rough string of outings in July and August. The 30-year-old has been much better of late, giving up three earned runs over his last 20 innings spanning three starts.

"Honestly, I think it's just a mentality," Kelly said. "Going through that little skid, I was trying to feel different things, find different things, instead of just going out and competing. That's the biggest difference."

The win was crucial for the Diamondbacks, who are trying to stay in a crowded National League wild-card race. They're still 4 1/2 games behind the Chicago Cubs for the final playoff spot with 13 games remaining.

Kevin Ginkel pitched the eighth and Archie Bradley earned his 14th save to finish the shutout. The Diamondbacks won despite sending just 25 batters to the plate, one over the minimum through eight innings.

"We scratched across the one run," Arizona manager Torey Lovullo said. "Nick with a hustle triple out of the box. That's one of those little things we do very, very well."

It's only the second time in franchise history that the Diamondbacks have won a game with just one hit. The other was in 2011.

Cincinnati's Anthony DeSclafani (9-9) was the tough luck loser, giving up just one hit and no walks over seven innings. Joey Votto, Eugenio Suárez and Aristides Aquino all had one hit.

"One baserunner, you can't do any more than what (DeSclafani) did tonight," Cincinnati manager David Bell said. "It is very encouraging for him and for us. He continues to pitch very well."

The game was played in just 2 hours, 16 minutes.

HISTORIC WIN

The Diamondbacks are the first team since at least 1900 to win a MLB game with just one baserunner in a game that lasted at least nine innings, according to the Elias Sports Bureau.

TRAINER'S ROOM

Reds: SS Freddy Galvis left the game in the seventh inning after an awkward swing. He was replaced by Alex Blandino.

Diamondbacks: RHP Luke Weaver (forearm tightness) threw 29 pitches over two scoreless innings in a rehab start in Single-A Visalia on Friday. Manager Torey Lovullo said Weaver felt good after the outing and the team was focused on what the next steps in his rehab would be. ... LHP Robbie Ray (finger blister) threw a 37-pitch bullpen on Saturday and Lovullo said there were no issues. Ray gave up five runs in 2/3 of an inning against the New York Mets on Wednesday before leaving because of the blister.

UP NEXT

Reds: RHP Trevor Bauer (10-12, 4.55 ERA) makes his ninth start since being traded to Cincinnati earlier this season. He's 1-4 with a 7.40 ERA through eight starts.

Diamondbacks: RHP Zac Gallen (3-5, 2.66) takes the mound for Arizona. In four home starts since being traded from the Marlins, Gallen is 2-0 with a 1.57 ERA and opponents are hitting just .158.

___

Follow David Brandt on Twitter: https://twitter.com/davidbrandtAP

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports