NEW YORK -- The Astros' bullpen had done pristine work in relief of starting pitcher Charlie Morton in the seventh and eighth innings Tuesday night at Yankee Stadium, setting up Chris Devenski with a shot to close out the game.
The plucky Yankees were primed for another dramatic win.
Brett Gardner hit a game-tying, two-run homer off Devenski in the ninth inning -- his second homer of the game -- and rookie sensation Gleyber Torres hit a walk-off single in the 10th off Brad Peacock to score Miguel Andujar and send the Astros to a 6-5 loss.
"I think I left it over the plate a little bit too much," Peacock said. "It all started with an 0-2 breaking pitch to Andujar [who doubled with two outs]. Just a bad pitch."
The Astros' bullpen, which blew an 8-3 lead in the ninth inning Sunday in Cleveland, was shorthanded, with manager AJ Hinch trying to avoid using several key relief arms. That included closer Ken Giles, who was forced to warm up in the 10th.
"We had a tough time finishing a few hitters that paid off big for them," Hinch said. "Obviously, our bullpen has been beat up a little bit. We had a number of guys we weren't going to use tonight. That was changing as the game was going. We feel it a little bit on a night like this, where a leadoff walk ends up coming back and scoring on the home run [in the ninth], or a two-strike double that leads to another expanded opportunity with Torres at the end."
Devenski's leadoff walk to Andujar in the ninth set up Gardner's second homer. He went 4-for-5.
"The walk is what killed me," said Devenski, who was working for the third day in a row. "The walk is unacceptable in that situation, and it caused a lot of damage there."
The Astros were 3-for-17 with runners in scoring position and stranded 10 men on base, helping the Yankees to overcome five errors.
Morton, who was bidding for his Major League-leading eighth victory, grinded through a 100-pitch, six-inning outing in which he struck out 10 batters and enjoyed only one 1-2-3 inning. Gardner led off the first with a homer, and Aaron Judge led off the fifth with a homer -- his 15th -- that cut the Astros' lead to 5-3.
"They did a great job getting to my fastball," Morton said. "They didn't miss many mistakes, and they were hitting them pretty hard."
The Yankees committed two of their five errors in the fifth inning, leading to pair of unearned runs against Sabathia. Yuli Gurriel had an RBI single in the inning, and Gattis later lifted a sacrifice fly to center for a 5-2 lead.
The game marked the first time since June 12, 1993, (vs. the Rockies) that the Astros lost a game in which the opponent committed five errors.
YOU GOTTA SEE THIS
What happens when a 100.3-mph Albertin Chapman pitch gets past the catcher? It ricochets off the backstop and right back to catcher Gary Sanchez, of course. That enabled Sanchez to throw a strike to Andujar, who put a tag on Astros runner Tony Kemp trying to advance from second base for the final out of the 10th.
"I was prepared to be on third base, and I looked up and the ball was in his glove," Kemp said. "You're in no-man's land at that point, so you've just got to keep looking for a bad throw, and he put it on the money." More >
HE SAID IT
"Full moon tonight. The ball didn't drop our way." -- Kemp
The Yankees and Astros meet for the final time in the regular season in Wednesday's 5:35 p.m. CT finale at Yankee Stadium. Dallas Keuchel (3-6, 3.39 ERA), who's 6-4 with a 1.83 ERA in 10 career starts against the Yankees in his career (regular season and postseason), will start for the Astros against right-hander Luis Severino (7-1, 2.28 ERA).