BOSTON (CBS) — The outlook on Sunday at Fenway Park looked dreary. The Red Sox couldn’t muster a hit, they trailed by a few runs, and the Yankees had the bases loaded in the seventh inning, looking to blow the game wide open.

The picture wasn’t ideal for the Boston baseball club. But manager Alex Cora never lost confidence.

READ MORE: Revs Beat Orlando City 2-1, Extend Unbeaten Streak

While on the mound for a pitching change in that seventh inning, Cora told his infielders that they just needed to get out of that inning without allowing any damage, and the comeback would ensue.

“When AC went up to the mound and he took Yacksel [Rios] out of the game and he brought in [Josh Taylor], he said to us, ‘If JT gets out of this inning, we’re winning this game,'” Kiké Hernandez said.

Sure enough, Taylor got the Red Sox out of that inning, getting Giancarlo Stanton to strike out swinging and inducing an inning-ending fly out from Rougned Odor. The Red Sox once again went hitless in the bottom of the seventh, with German actually getting four outs thanks to Xander Bogaerts reaching first on a passed ball on a swinging strike three. And the Yankees tacked on a run against Brandon Workman in the top of the eighth to grow their lead to 4-0.

Again, the outlook wasn’t good.

READ MORE: Stanton's Slam Lifts Yanks To 5-3 Win, WC Tie With Red Sox

But Alex Verdugo led off the bottom of the eighth with a double, ending the no-hit bid and chasing German from the game.

Then Hunter Renfroe doubled. Then Christian Vazquez and Franchy Cordero both singled. Then Hernandez hit a double to left field, cutting the Yankees’ lead to 4-3. Kevin Plawecki hit an RBI groundout to short, before Bogaerts hit a sacrifice fly to give the Red Sox a 5-4 lead heading into the ninth inning.

Matt Barnes entered and made quick work of the Yankees, closing out the victory that nobody saw coming — nobody except Cora, of course.

“You trust what AC says,” Hernandez said. “A lot of times, he sees things before they happen, and you just go with it. And if he says that we’re gonna win this game, then it’s probably gonna happen.”

MORE NEWS: Boston College Beats Mizzou 41-34 In OT

With the win, the Red Sox improved to 10-3 vs. the Yankees this season. At 61-39, the Red Sox sit in first place in the AL East, one game ahead of the Rays and nine games ahead of the Yankees. Staff