The Boston Red Sox finally put it all together, and it didn't matter one bit that this very important victory came at the expense of the last-place Baltimore Orioles.

J.D. Martinez and Hunter Renfroe homered to back a dominant pitching performance by Nathan Eovaldi, and Boston broke a four-game skid and bolstered its playoff hopes with a 6-0 shutout Wednesday night.

The victory enabled the Red Sox to move within a game of the New York Yankees for the top AL wild card. Seattle remained a half-game behind Boston for the other wild-card spot, with Toronto one game in back of the Red Sox.

"We did a lot of good things. Overall, a pretty good game," manager Alex Cora said. "Our goal was to come here and win the series, and we have a chance to do that tomorrow."

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Boston failed to score more than three runs in any game during New York's weekend sweep at Fenway Park, and the trend continued Tuesday with a 4-2 loss to Baltimore.

But the Red Sox rebounded with a 13-hit outburst, led by two of their most prolific hitters.

"We're a lot better when the big boys do damage," Cora said. "That was a good first step."

Martinez hit his 28th homer in the second inning for a 1-0 lead, and the Red Sox used a broken-bat single and an error to tack on two unearned runs in the sixth.

Eovaldi (11-9) took it from there, limiting Baltimore to four hits and striking out seven over six innings. The right-hander was 0-2 in his previous eight starts, including a loss Friday night in which he yielded seven runs to the Yankees.

"I always feel like pitching is going to get the team going," Eovaldi said. "Hopefully, we’re going to be able to keep the momentum rolling."

Boston had seven hits after five innings with only one run to show for it against rookie Zac Lowther, who yielded 10 runs and 12 hits over his previous two starts against the Red Sox.

Lowther (1-3) was pulled after Rafael Devers cracked his bat on a leadoff single in the sixth. Xander Bogaerts subsequently reached on an error by third baseman Kelvin Gutiérrez before Martinez smacked a two-run double.

Alex Verdugo added a two-run single in the eighth, and Renfroe hit his 30th homer in the ninth.

LANDSLIDE MVP

CF Cedric Mullins was honored before the game as the 2021 Orioles MVP after receiving every first-place vote from a panel of media that covers the team on a regular basis. Mullins is the first player in Orioles history to have 30 home runs and 30 stolen bases in a single season, and he was Baltimore's lone representative at the All-Star Game. He leads the team in games played, batting average, doubles, triples, stolen bases and runs.

TRAINER'S ROOM

Red Sox: RHP Garrett Whitlock (pectoral strain) played catch before the game. "He feels great," Cora said. "The goal is for him to throw a bullpen Friday and go from there." ... LHP Josh Taylor (lower back strain) remains in Boston and has not yet participated in baseball activities. ... RHP Phillips Valdez and INF/OF Danny Santana have been on the COVID-19 list for several weeks, but are working out and have the potential to return. "Anything can happen in two hours or in the upcoming days. You’ve got to get them ready," Cora said.

UP NEXT

Red Sox: Nick Pivetta (9-7, 4.52 ERA) starts the series finale Thursday night. The right-hander is winless in six starts since beating Baltimore on Aug. 13.

Orioles: Rookie LHP Alexander Wells (1-3, 7.61) makes his eighth career start, the second against Boston. He did not factor in the decision after allowing five runs in five innings at Fenway Park on Sept. 18.