HOUSTON -- Yoenis Cespedes and Brandon Moss delivered consecutive RBI singles in the ninth inning as the Oakland Athletics rallied for six runs in their final at-bat en route to a 7-4 victory over the Houston Astros on Tuesday night at Minute Maid Park.

Armed with a 4-1 lead, Astros closer Chad Qualls (1-2) coughed up the advantage. He allowed a two-run single to pinch hitter Alberto Callaspo three batters before Cespedes delivered a flare to right field that scored designated hitter John Jaso and pulled the Athletics even.

Moss followed with his run-scoring single off left-hander Tony Sipp. Right-hander Jose Veras, the third Houston pitcher of the inning, entered and surrendered a two-run double to Athletics third baseman Josh Donaldson, closing the book on Qualls, who allowed five runs while recording only two outs, wasting a strong start from Scott Feldman.

Feldman worked seven innings and allowed just one run on five hits and three walks, outdueling Athletics right-hander Jeff Samardzija. The Astros (43-64) appeared in prime shape for a surprising series victory when right-hander Josh Fields worked a perfect eighth inning, but the Athletics (66-40) rallied spectacularly.

Right-hander Evan Scribner (1-0) earned the win. Left-hander Sean Doolittle notched his 16th save by retiring the side in order in the ninth.

What was a stalemate between Feldman and Samardzija turned in the Astros' favor following a lengthy replay review (3 minutes, 25 seconds) in the fifth inning, one that upheld the original ruling that Houston right fielder Robbie Grossman beat the tag of Athletics second baseman Eric Sogard for a stolen base.

On the next pitch, Samardzija surrendered an RBI triple to Astros center fielder Enrique Hernandez, scoring Grossman and snapping a 1-1 tie. One pitch later, Astros second baseman Jose Altuve delivered a run-scoring single that brought home Hernandez and upped the lead to 3-1.

Samardzija had retired 12 of 14 batters between Astros shortstop Marwin Gonzalez ricocheting a solo home run off the right field foul pole in the first inning and Grossman reaching via single in the fifth. He threw several warm-up tosses during the replay review, but his rhythm appeared disrupted long enough for the Astros to take full advantage.

Feldman worked around baserunners in three of his first four innings before allowing a solo home run to Athletics center fielder Josh Reddick leading off the fifth inning. Two more batters reached base that frame, but Feldman limited the damage and kept rolling after that minor bump.

NOTES: Athletics CF Coco Crisp underwent an MRI exam in Oakland on Monday, the results of which revealed no additional damage to the sore neck that has plagued him this season. Crisp should avoid a trip to the disabled list. After additional rest through the balance of the series with the Astros, he will be re-evaluated when the club returns home. ... Astros OF George Springer took pregame batting practice for the first time since landing on the 15-day disabled list July 23 (backdated to July 20) with a left quad strain. ... With Athletics manager Bob Melvin short on options with primary center fielders Coco Crisp and Craig Gentry unavailable, RF Josh Reddick made his first start in center this season. Reddick last started in center on Sept. 27, 2012, at Texas.