Yankees' Paul Goldschmidt doubles during the fourth inning of a...

Yankees' Paul Goldschmidt doubles during the fourth inning of a baseball game against the Cardinals on Sunday in St. Louis. Credit: AP/Jeff Roberson

ST. LOUIS — The Yankees just might — emphasis on “might” — be starting to roll.

Though it was far from an impressive performance on what overall was an ugly afternoon of baseball by both clubs, the Yankees completed a three-game sweep of the Cardinals with an 8-4 victory on Sunday at Busch Stadium.

The Yankees (67-57), taking advantage of a soft schedule, have won five of their last six and six of their last eight. They lead Cleveland by 3 1/2 games  for the final American League wild-card spot and pulled within a half-game of the Red Sox and Mariners, who are tied for the first spot.

Could this win spark a prolonged stretch of good baseball? “I hope so,” said Paul Goldschmidt, back in the starting lineup after tweaking his right knee last week. “These last five or six weeks will tell. Obviously, this was a good week for us to win five out of six games, but there’s a lot of tough opponents coming up.”

Luke Weaver (3-3) didn’t allow a hit in the final 1 2⁄3 innings to get the win.

After blowing a 3-0 lead and rallying to tie the score at 4-4, the Yankees broke the tie in the ninth, scoring four runs that more or less were gifts, courtesy of two errors by Cardinals second baseman Thomas Saggese.

Still, a team has to take advantage of opportunities when they’re given, and the Yankees found ways to win rather than lose.

“The value of putting the ball in play and taking advantage of mistakes,” Aaron Boone said.

The speedy Jose Caballero,  whom Boone recalled “hating” from the opposing dugout when he had to face him and a player starter Will Warren referred to as “a pest,” started the rally with a grounder to second that Saggese threw away for a two-base error. A wild pitch moved him to third.

After Trent Grisham grounded to first, with Caballero holding at third, pinch hitter Giancarlo Stanton walked and Aaron Judge was intentionally walked to load the bases. Cody Bellinger then sent a grounder to second that Saggese failed to handle, with two runs scoring on the play to make it 6-4.

Jazz Chisholm Jr. hit into a 4-6 forceout that allowed Judge to score and stole his 21st base of the season before scoring on Goldschmidt’s double for an 8-4 lead.

Goldschmidt had two doubles and a single in his first start against the team with which he spent the previous six years. He received a loud ovation before his first at-bat and doffed his cap in appreciation.

Caballero started at shortstop as Anthony Volpe got a rare day off. He had an RBI single through the almost completely open right side of the infield and finished the series 5-for-11 with four steals and four runs. “I’m just trying to help the team as much as I can right now,” he said.

Camilo Doval, who has been erratic in his brief time with the Yankees, hung a 1-and-1 slider to Yohel Pozo leading off the sixth, and he crushed it 405 feet to left-center to give the Cardinals a 4-3 lead.

The Yankees tied it in the seventh. Grisham led off with a walk against Kyle Leahy (Cardinals manager Oliver Marmol subsequently was thrown out by plate umpire Nic Lentz for objecting to his strike zone) and Ben Rice struck out. Riley O’Brien came in to face Judge, who singled to right to put runners at the corners, and Bellinger’s sacrifice fly made it 4-4.

Chisholm drew a one-out walk in the fourth, went to third on Goldschmidt’s double and scored on an infield single by Jasson Dominguez. RBI singles by Ryan McMahon and Caballero gave the Yankees four straight hits and a 3-0 lead.

Grisham struck out looking on a pitch later in the inning that appeared well inside, prompting Boone to jaw at Lentz. Catching coach Tanner Swanson, sitting toward the far end of the dugout away from Boone, also voiced his displeasure and was ejected by third-base umpire and crew chief Vic Carapazza.

Warren, who pitched better than the length of his outing might suggest, allowed three runs (one earned) and six hits in 4 2⁄3 innings. McMahon’s error contributed to two Cardinals runs in the fourth and Chisholm’s miscue in the fifth led to another.

“It’s always really good, obviously, getting a sweep heading into an off day, but you’ve got to keep going,” Boone said. “We’re not a finished product yet.  We know we’re capable of a lot, but we’ve got a ways to go.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME