HOUSTON — Despite having ace Masahiro Tanaka on the mound, the surging Yankees ran into a speed bump in the form of Lance McCullers, who struck out 10 and allowed just five hits through six innings of a 4-1 Astros victory Wednesday night at Minute Maid Park.

Ken Giles, Luke Gregerson and Will Harris held the Yankees hitless over the final three innings, adding five strikeouts to boost their total Ks to 15. The Yankees still recorded their third straight series win and have an off day Thursday before a three-game series that begins Friday night at Tampa Bay.

But on a day when wild-card leaders Toronto and Boston lost, an opportunity went begging. “Those are the days you have to win because you’re trying to make up ground,” manager Joe Girardi said.

The common thread in the 8-2 streak the Yankees carried into the series finale was quality starting pitching, and with Tanaka (7-3) working on a 4-0 streak in his past seven starts, they figured to be in good position for the sweep. He was coming off an 83-pitch outing in a no-decision against the Giants, hadn’t thrown more than 93 pitches in his past three starts and figured to be fresh.

It didn’t happen. Tanaka threw 94 pitches but got through only five full innings. He left trailing 4-1 after giving up seven hits, walking two and striking out four.

advertisement | advertise on newsday

Asked if pitching on less than his optimal five days’ rest might be a factor, Girardi shrugged with some exasperation. “He has to be able to pitch (every fifth day),” the manager said. “We can’t adjust the whole schedule around one person. It could be (a factor). The last two years, his numbers were better. We’ve limited his pitches and limited his bullpens.”

Tanaka’s problems began in the second inning when he issued consecutive one-out walks to Preston Tucker and Alex Bregman before a double by Carlos Gomez scored Tucker. The damage was minimal in that inning, but the game got away from Tanaka in the third.

Marwin Gonzalez hit a leadoff single, went to second on a groundout and moved to third on a wild pitch before scoring the Astros’ second run on a single by Carlos Correa. The next hitter was Colby Rasmus, who launched a splitter deep into the seats in right-center for a 4-1 lead. Rasmus’ homer ended an 0-for-29 slump.

“I’m just very disappointed in myself,” said Tanaka, who was not asked about getting adequate rest.

After bashing 13 hits in Tuesday’s win, the Yankees struggled against a different look from McCullers (6-4), who relied heavily on a knuckle curve that had them flailing. Their only run came when cleanup hitter Brian McCann led off the fourth by blasting the first pitch, a 93-mph fastball, just over the top of the wall about 415 feet deep in left-center.

Yankees videos

McCann admitted he was looking for a first-pitch fastball and trying to avoid McCullers’ curve at all costs. “Not a lot of guys in the game throw a curve at 86 miles an hour,” McCann said. “Of the (91) pitches he threw, it seemed like 89 were curves.

“But we feel we’re trying to win series, and we played a tough team and won two of three. We’re going to continue to play good baseball in Tampa.”