Bill Hall started the winning rally in the bottom of the 10th with a towering double off the wall in left-center against losing pitcher Ivan Nova. Kevin Cash moved Hall to third with a sacrifice bunt. Eric Patterson sent everybody home with a one-out single to center.
"Anytime you can walk off and be a part of it, it's definitely fun," said Patterson. "It was a long day, but a good day with the whole Mikey Lowell tribute and everything. It's too bad we couldn't win that first game, but to come back and win the second one, it was good."
Both games went 10 innings -- the Yankees winning the opener, 6-5. The last time the Red Sox played two extra-inning games on the same day? July 17, 1966, against the Kansas City Athletics.
"It's nice to win," said manager Terry Francona. "We were here a long time today. It's nice to have a win. I don't care if it's September, October or April. You spend that much time at the ballpark -- it's nice to have a win."
Though the Yankees and Rays are tied for the lead in the AL East entering the last day of the regular season, Tampa Bay would win the tiebreaker because it won the season series against New York. Either way, both clubs are going to the postseason. The Red Sox were eliminated earlier this week and are out of the postseason for the first time since 2006.
"I think everybody's ready to get home," said Cash. "Nothing's going to keep us from thinking about Monday morning, when guys are flying out, driving out. It's been a long year. But if you can win this one, win [Sunday], people will at least be walking out with smiles."
Both games lasted more than four hours -- the aggregate time of the doubleheader was eight hours and 18 minutes.
The Yankees were just six outs from reducing their magic number to one for the AL East title. But the Red Sox came roaring back from a two-run deficit in the bottom of the eighth. Jed Lowrie led off with a pinch-hit walk. Ryan Kalish ripped a single to right, putting runners at the corners with nobody out.
An infield single by Daniel Nava made it a one-run game. David Ortiz came on as a pinch-hitter and drew a walk against Nova to load the bases with one out. Cash then worked an 11-pitch walk to force in the tying run. It was Cash's first RBI since being reacquired by the Red Sox on July 1.
"You know what, Cashy did a great job tonight," Francona said. "He caught the whole game. He ran the game. [Caught] multiple pitchers. He had a really good at-bat. He got the bunt down. Good for him. He hasn't played much the last month, but he's always energetic and trying to help, and he helped us win a game tonight."
The Yankees can still win the division with a win over Boston on Sunday and a Tampa Bay loss to Kansas City.
Francona rested nearly all his regulars in Game 2, which didn't start until 9:22 p.m. ET.
"It was a spirited game," Francona said. "We appreciate the [effort], and I think, maybe a good word is cooperation. Guys like David [Ortiz], [being] ready to hit. Victor [Martinez] was ready to come in in the last inning. We've asked a lot of those guys. But we got some good hustle from [Josh] Reddick, and things like that."
Daisuke Matsuzaka (five innings, three hits, four runs, two earned runs, five walks, six strikeouts) battled with his command from the outset.
"[His] command was not real good," Francona said "The ball wasn't coming out [of his hand] real good. It just wasn't his best stuff. Some walks, a lot of pitches. But, you know, they didn't score a lot of runs. That's a tough lineup. When you walk anybody in that lineup, you're making it hard."
Matsuzaka finished his fourth season with the Red Sox 9-6 with a 4.69 ERA in 25 starts.
Despite his struggles, he Red Sox stayed at it, and ultimately had a reward for their efforts.
By the time the nightcap ended at 1:22 a.m. on Sunday, the Red Sox chased after walk-off hero Patterson in short right field like the 1985 Chicago Bears' pass rush.
"Once I hit it, I knew they were coming," said Patterson. "I was really contemplating making them chase me around the field, but it was a long day. I think they would have gotten me eventually."