PHOENIX -- The series between National League playoff hopefuls Atlanta and Arizona has been a wild ride, and Saturday night's ending might have topped them all.
"He just gave every last bit of energy he had and obviously won the game for us," Braves manager Brian Snitker said.
In the bottom of the inning, with runners at second and third, A.J. Pollock grounded a two-out single up the middle. Steven Souza Jr. scored from third, but Ahmed tried to come around from second and was thrown out by Swanson to end the game.
"A.J. hit the ball and I was going hard and T.P. (third base coach Tony Perezchica) was waving me and it was close," Ahmed said. "I didn't get there."
Swanson said he figured Ahmed would try to score because he would have done the same thing.
"That is just kind of how I would play it offensively. He is scoring no matter what," Swanson said. "I don't think anyone really anticipated that I would be able to catch it and be able to make a throw like that. Honestly, it was the right play on both sides."
Diamondbacks manager Torey Lovullo said he didn't have "a perfect snapshot" of the play but thought it might have been better to hold up at third and give the next batter a chance.
"I feel like there's certain times when you take a little bit of risk and there's other times you don't," he said. "That may not have been the best time to take that type of risk."
The victory boosted Atlanta's lead in the NL East to 3 1/2 games over Philadelphia. Arizona fell 2 1/2 games behind first-place Colorado in the NL West.
Neither team led by more than one run until the 10th.
Souza robbed Kurt Suzuki of at least a double with a leaping grab at the right-field fence, but Inciarte followed with a triple that made it 5-3.
Chad Sabotka (1-0) got the final out in the ninth for his first major league win.
With some difficulty, A.J. Minter picked up his 13th save in 15 tries.
Both teams threatened in the ninth. Swanson tripled off Yoshihisa Hirano with one out but was stranded when pinch-hitter Lucas Duda struck out and, after Ronald Acuna Jr. was intentionally walked, Johan Camargo grounded out.
Arizona, with the help of a throwing error by Camargo at third, loaded the bases with two outs in the bottom of the ninth before Daniel Descalso lined out to center.
Suzuki put the Braves up 3-2 with a two-out solo home run off Jake Diekman in the eighth, but Arizona answered in its half of the inning.
There were four errors in the first two innings, three by Arizona, resulting in a 2-2 deadlock.
Acuna doubled on the game's first pitch and scored when Peralta bobbled Camargo's single to left field. Markakis' sacrifice fly made it 2-0.
The Diamondbacks got an unearned run in the first when Pollock came home from first on Goldschmidt's foul pop to the railing beyond first base. Freeman's throw home came in plenty of time, but Suzuki dropped it.
Arizona tied it 2-all in the second when pitcher Clay Buchholz's two-out double to left-center scored Souza from first. It was the first RBI and extra-base hit in 45 career at-bats for Buchholz.
The Diamondbacks, one of the best defensive teams in baseball, committed four errors.
"The errors we made today weren't typical of what we do here every single day," Lovullo said, "so I just think at times we try to make things happen and we force things and maybe press a play or two and will it to happen, and it doesn't happen."
Braves: RHPs Jose Ramirez and Arodys Vizcaino made rehab appearances for Class A Rome in a playoff game Friday. Ramirez allowed four runs and four hits while getting just one out. Vizcaino tossed a scoreless ninth in a 6-0 loss to Lexington that eliminated Rome.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Mookie Betts ties the game 3-3 with a solo blast in the 5th inning.
Edwin Encarnacion cuts the Indians' deficit in half with his 100th RBI of the season.
Vazquez hustles down the line to beat out a throw at the plate, putting the Red Sox up 2-0.
Kyle Freeland extended his unbeaten streak to 10 starts, and Colorado beat the Arizona Diamondbacks 2-0 on Sunday for a three-game sweep than kept the Rockies 1 1/2 games behind St. Louis for the NL's second wild card with one week remaining in the...
Xander Bogaerts throws out Edwin Encarnacion at the plate while on the run to keep the Indians scoreless.
Matt Carpenter bashes a two-run home run to right field in the 8thg inning, his 36th long ball on the season.