The Yankees went the first 38 home games of the season without a walk-off victory.

Then they had two in less than 24 hours.

Friday night it was Brian McCann's three-run homer in the 12th that rallied the Yankees; Saturday afternoon it was a throwing error by the Rays that brought in pinch runner Jose Pirela with the winning run in the bottom of the ninth inning of a 3-2 victory in front of 35,508 at the Stadium.

Mark Teixeira started the rally with a leadoff double against Rays righthander Brad Boxberger. Pirela came into pinch run for Teixeira and Boxberger walked Chris Young. Ramon Flores laid down a sacrifice bunt and Boxberger's throw took James Loney off the bag, the ball skittering away. Loney's throw home to get Pirela was late.

The crowd, after having much of the wind taking out of it in the top half of the inning when Dellin Betances allowed a game-tying two-run homer to Steven Souza Jr. on a hanging 2-and-2 curveball, roared.

Betances' blown save did cost Michael Pineda a victory.

Pineda, who allowed a career-high eight runs and 11 hits in that start against Philadelphia but then just two runs over eight innings last Sunday in Houston, allowed five hits Saturday.

Pineda (9-5, 3.79) struck out three in the first inning, on his way to eight strikeouts through five innings and 10 overall.

It marked his second-highest strikeout total of the season, second to the 16 Orioles he struck out May 10 at the Stadium.

After walking Kevin Kiermaier with none out in the second, Pineda retired 18 of the next 19 batters. He retired 12 straight after Steven Souza Jr.'s leadoff single in the fourth, with Curt Casali breaking the streak with a leadoff double in the eighth. Lefty Justin Wilson struck out the next two batters and Joe Girardi brought on Dellin Betances, who got out of the inning. Betances allowed a leadoff single to James Loney, who improved to 44-for-107 in his career at the Stadium, then allowed Souza's 15th homer of the season to tie it at 2-2.