HOUSTON (AP) Welington Castillo was mad after striking out with a chance to put Arizona ahead in the seventh. He took his anger out on the first pitch he saw in his next at-bat.
Castillo and Jake Lamb homered in the 10th inning, and the Diamondbacks beat the Houston Astros 6-4 Friday night for their season-high sixth straight win.
Castillo, who finished with three hits, drove the first pitch of the 10th from Pat Neshek (3-2) just inside the left-field foul pole for his 11th home run of the year.
''I couldn't do anything about the last at-bat, so just reset my mind and calmed down, look for something to hit my next at-bat,'' Castillo said. ''He gave me a fastball middle in, and I put my best swing on it. I was lucky to hit it out.''
Castillo has three home runs in his last two games after hitting two Wednesday in Seattle.
''I can't explain it honestly,'' Castillo said. ''Just being me. I am seeing the ball better and looking for my pitch and being confident at the plate, not chasing a bad pitch. I just feel comfortable at the plate, and my timing is good.''
Lamb followed with a shot to right.
''They got the pitches they could handle, a couple hangers from Neshek,'' Arizona manager Chip Hale said. ''We did a great job coming back. We got down, the guys kept battling.''
Neshek had not allowed a home run since June 10 at the White Sox. It was the first time he allowed two in a single outing since Aug. 25, 2013, for Oakland at Baltimore.
Daniel Hudson (3-3) pitched two scoreless innings for the win, and Brad Ziegler got the last three outs for his 18th save.
AL West-leading Houston grabbed a 4-1 advantage in the fifth on a three-run homer by Jason Castro and a solo shot by Carlos Correa.
''We had the lead,'' Houston manager A.J. Hinch said. ''Any time you have the lead at some point late in the game, you feel like it got away from you a little bit. We didn't play our best today. In all aspects of the game, we had a tough time answering them and it cost us the game in a couple different ways.''
Castro also hit a three-run shot for the winning homer in Thursday's 3-0 victory over the Angels.
The Diamondbacks pulled within a run in the sixth. David Peralta singled and Castillo doubled before Lamb and Yasmany Tomas had consecutive run-scoring grounders.
Peralta added a tying RBI single in the seventh. He finished with three hits, and Tomas and Paul Goldschmidt each had two hits for Arizona.
The loss spoiled the Houston debut of Carlos Gomez, who was acquired in a trade with Milwaukee on Thursday. Gomez, who started in center field, received a nice ovation when he came to the plate in the first, and after he flew out to center. He went 0 for 5.
''It was exciting and weird,'' Gomez said. ''I come here a lot of times and being on the other side, walking to the plate. It's kind of weird the first couple of times. But after that, I feel better.''
Preston Tucker, Luis Valbuena and Marwin Gonzalez each had two hits for Houston.
Tomas put the Diamondbacks up 1-0 with an RBI single in the second.
Houston right-hander Scott Feldman allowed three runs and seven hits in 5 1/3 innings. He remained winless in three starts since coming off the disabled list July 18.
Arizona righty Rubby De La Rosa, who had allowed one run over his last 15 innings spanning two starts, gave up four runs and eight hits over six innings. De La Rosa retired seven straight and nine of 10 batters until the fifth inning.
COMING AND GOING
To make room for Gomez on the roster, Houston optioned 1B Jon Singleton to Triple-A Fresno. ... Houston will activate RHP Mike Fiers before Saturday's game and make a corresponding move at that time. The Astros acquired Fiers in the trade with Milwaukee.
Diamondbacks: OF A.J. Pollock left in the seventh with tightness behind his left knee. Hale said Pollock was taken out for precautionary reasons. Pollock is expected to sit Saturday and could play Sunday, Hale said.
Astros: LHP Dallas Keuchel (12-5) starts the second game of the weekend series. He went 2-2 with a 3.71 ERA in four July starts.
Diamondbacks: RHP Jeremy Hellickson (7-6) is 2-1 with a 1.88 ERA in his last four starts.