– The New York Yankees capitalized on the few hits they got in between strikeouts.

Brett Gardner homered and Stephen Drew hit a two-run double as the Yankees pieced together just enough offense to overcome Rick Porcello's career-high 13 strikeouts and beat the Boston Red Sox 3-1 on Tuesday night.

The Yankees had only five hits and struck out 15 times, but New York hit in key moments and Boston batters failed to give Porcello much help.

"The gratifying thing at this time of year is wins, no matter how you do it," Yankees manager Joe Girardi said. "If you get a break or however it happens, that's the gratifying thing."

The Yankees helped themselves defensively, getting a strong start from Michael Pineda and catching the Red Sox in a double-steal attempt to quickly fizzle a promising rally in the eighth.

Pineda (10-8) allowed one run and four hits and struck out seven. Andrew Miller picked up his 29th save with three strikeouts in the ninth.

Porcello (6-12) scattered five hits over eight innings, and the only earned run he allowed was Gardner's solo homer in the eighth. He topped his previous high for strikeouts by two.

"You go out there and you want to win," Porcello said. "That's the bottom line. I think anybody would tell you that. It's a nice night for me personally but as far as the team goes we didn't accomplish what we wanted to."

Down 3-1 after Gardner's homer to right, the Red Sox had a chance to regain the lead in the bottom of the eighth. Mookie Betts and Xander Bogaerts singled, giving Boston runners at first and second for slugger David Ortiz.

The Red Sox sent both runners. The gamble failed as Betts was called out at third.

"At that point we figured it was a good risk," interim Red Sox manager Torey Lovullo said.