PHOENIX -- Ahead all night, the Atlanta Braves watched a two-run lead disappear in the ninth inning. A day after losing to Boston on a two-run homer in the ninth, they could have folded.
Instead, the Braves found a way to scratch out a victory and increase their NL East lead.
Dansby Swanson scored the go-ahead run on Yoshihisa Hirano's wild pitch in the 10th inning, and the Braves recovered after blowing a two-run lead in the ninth to beat the Arizona Diamondbacks 7-6 Thursday.
"It speaks to the makeup of that team in there. That's exactly what it speaks to," Atlanta manager Brian Snitker said. "The resiliency, the fight, the grit speaks volumes."
With his team leading 6-4 in the ninth, Snitker brought in Jesse Biddle (5-1), the Braves' seventh pitcher of the night. He couldn't close it out, giving up A.J. Pollock's sacrifice fly and Paul Goldschmidt's solo homer with two outs and two strikes.
Atlanta had a chance for the go-ahead run in the 10th on a single by Tyler Flowers that bounced off shortstop Nick Ahmed's glove, but Swanson stumbled over third base and had to retreat to the bag. The Braves then loaded the bases against Brad Boxberger (2-6) before Hirano uncorked a wild pitch that scored Swanson.
"Different frustrations, the way our lineup battled to get back in it in the ninth inning," Boxberger said. "I just couldn't hold it."
Brad Bach worked around a walk for his first save with Atlanta.
Nick Markakis had four hits and a run-scoring single in the ninth for the Braves, who increased their division lead to 3 1/2 games over Philadelphia.
"That's where the stubborn factor, the competitive factor, comes into play in this game," Swanson said.
Ahmed hit a three-run double for the Diamondbacks, who have lost five of six. Arizona fell 2 1/2 games behind first-place Colorado in the NL West.
"We didn't particularly play our best game today, but when we needed to we rallied around one another," Diamondbacks manager Torey Lovullo said. "We tied the game and unfortunately we couldn't close the deal."
Greinke lost his last start after giving up a pair of late homers to the Los Angeles Dodgers. He got off to a shaky start against the Braves, allowing two runs in the opening inning and Suzuki's two-run homer in the fourth. Camargo hit a solo shot in the sixth to put the Braves up 5-3.
Greinke yielded five runs -- four earned -- and six hits in 5 1/3 innings.
Braves starter Anibal Sanchez breezed through the first three innings, retiring 10 of the first 11 batters he faced. The right-hander ran into trouble in the fourth and Ahmed pulled the Diamondbacks to 4-3 on a bases-loaded double to the corner in left.
Sanchez allowed three runs and four hits in five innings.
SNITKER, SOUZA EJECTED
Both teams had issues with the umpires.
Snitker was ejected with one out in the sixth while on a mound visit to reliever Shane Carle. Snitker talked to Carle, then started arguing about a pitch with plate umpire Mark Ripperger. Snitker was tossed while walking back to the dugout.
Ripperger ejected Souza in the eighth inning after he argued a called third strike.
Arizona acquired INF-OF Patrick Kivlehan from the New York Mets for cash and selected his contract from Triple-A Reno. The Diamondbacks also transferred OF Jarrod Dyson to the 60-day disabled list after a setback in his recovery from a strained right groin.
Braves: Swanson returned to the lineup after being hit in the head by a pitch Tuesday and coming off the bench Wednesday. He went 1 for 4.
Diamondbacks LHP Patrick Corbin (10-5) has allowed three runs or fewer in six straight starts heading into Friday's game against the Braves. He is 3-1 with a 2.35 ERA during that span after tossing five scoreless innings against the Dodgers last time out. RHP Kevin Gausman (9-9) will make his first career appearance against Arizona.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Hall of Famer Barry Larkin, who spent his entire 19-year playing career with the Reds, wants to help develop minor leaguers and isn't interested in being manager.
The game between the Baltimore Orioles and Boston Red Sox scheduled for Tuesday night has been postponed because of rain.
Astros reliever Roberto Osuna has agreed to a peace bond and must comply with a series of conditions for one year or face criminal charges.
The end of the final week of the season will be nostalgic and bittersweet for the New York Mets. The beginning will serve to remind the Mets of a past they'd thought was buried, and how far they have to go to catch a familiar foe.
The Houston Astros are on the verge of clinching first in the American League West.
Nine sports franchises from Major League Baseball, the NBA and the NFL are encouraging fans to register and vote.