NEW YORK (AP) — Brandon McCarthy pitched a four-hitter and the New York Yankees avoided a three-game sweep, beating the Houston Astros 3-0 Thursday.

New York won for just the third time in 10 games. Chase Headley hit an early two-run double and the Yankees backed McCarthy with flawless fielding.

The Yankees' fans also made fine plays — sitting in the first row behind the Houston dugout, comedian Chris Rock wound up with a foul ball off the bat of Astros rookie Jon Singleton, and he gave the souvenir to a young boy as the crowd cheered.

McCarthy (5-2) outpitched Dallas Keuchel (10-9) as they both threw complete games without a walk. TheYankees had been shut out in McCarthy's previous two starts.

McCarthy struck out eight in his fourth career shutout and first this season. He was 3-10 with Arizona before being traded to the Yankees in July.

Keuchel gave up seven hits and struck out five.

More From 104.5 THE TEAM