Updated

Bronx, NY (SportsNetwork.com) - Brandon McCarthy tossed a four-hit shutout to lead the New York Yankees over the Houston Astros, 3-0, and salvage the finale of a three-game set at Yankee Stadium on Thursday.

McCarthy (5-2) struck out eight and didn't walk a batter for New York, which won for just the third time in 10 games. The right-hander ended a personal two-game slide and improved to 8-12 in 26 starts overall with the Diamondbacks and Bombers this season.

"He was in command most of the game," said Yankees manager Joe Girardi. "He wasn't in trouble much today."

Chase Headley drove in a pair of runs and scored during a three-run second inning for the Yankees, who will conclude a six-game homestand this weekend with three games against the Chicago White Sox.

McCarthy outdueled Houston starter Dallas Keuchel (10-9). The left-hander suffered the tough-luck loss despite allowing just three runs on seven hits in eight innings. He struck out five and also didn't walk a batter during the shortest game in new Yankee Stadium history at two hours and seven minutes.

Houston fell to 4-3 on its current 10-game road trip.

The Yankees got all they would need in the second inning. Mark Teixeira singled to start the inning and moved to third when Martin Prado followed with a double. Headley continued the rally with a two-base hit to score both runners for a 2-0 lead. Headley moved to third on a Francisco Cervelli ground out and scored on Ichiro Suzuki's sac fly for the three-run lead.

"I could have been a little bit better in the second inning," said Keuchel. "Outstanding job by McCarthy. That was pretty dominant."

McCarthy got out of trouble in the fourth. With runners on second and third and two outs, McCarthy had a comebacker off the bat of Marc Krauss hit him in the leg, but he recovered to pick up the ball and make the out at first to end the frame.

McCarthy again pitched out of danger in the seventh. Again with runners on second and third, this time with one out, McCarthy struck out Jonathan Singleton and got Carlos Corporan to fly out to left to end the threat.

The complete game was the ninth of McCarthy's career. It was also his fourth career shutout.

Despite the win, the Yankees have scored four or fewer runs in 10 straight games.

Game Notes

Yankees OF/DH Carlos Beltran missed his second straight game with an elbow injury ... Prior to the game, the Yankees recalled infielder/outfielder Zelous Wheeler from Triple-A Scranton/Wilkes-Barre (IL) and optioned pitcher Chase Whitley to Triple-A ... Wheeler started the game as the DH and finished 0-for- 3 ... Actor/comedian Chris Rock, sitting behind the Astros dugout, caught a foul ball off the bat of Singleton in the seventh inning. He lifted the ball to the crowd and then gave it to a nearby child.