Nestor Cortes of the Yankees pitches during the first inning against...

Nestor Cortes of the Yankees pitches during the first inning against the Astros at Yankee Stadium on Saturday. Credit: Jim McIsaac

The Yankees hit on the rarest of franchise daily doubles Saturday afternoon.

They not only beat the team that has tortured them more than any other during the past decade — especially in October — but did so by besting the player who has contributed to that postseason angst more than any other.  

With Nestor Cortes making a triumphant return to the rotation after a two-month absence and the offense scratching out just enough against Justin Verlander, the Yankees held the Astros to two hits and struck out 16 in a 3-1 victory in front of 41,411 at the Stadium.

“Yeah, finally,” Gleyber Torres said with a laugh, referring to beating Verlander.

Jake Bauers’  fourth homer in his last seven games, a solo blast  off Verlander in the fifth inning, broke a 1-1 tie. Torres hit his 17th homer, a shot to right-center off Kendall Graveman in the eighth, to give closer Clay Holmes a two-run cushion.

“Any time you can have success in the major leagues, it feels good,” said Bauers, who blasted a hanging 1-and-0 slider 410 feet into the second deck in rightfield. “It’s a hard game and these are the best players in the world, Verlander especially. Haven’t had too much success off of him (2-for-13, five strikeouts coming into the day) but felt like I was seeing him pretty well today.”

Bauers, who struck out looking in his first at-bat and lined out to right his second time up, said he wasn’t looking for a specific pitch. “But I feel like I was on the fastball the at-bat before that, so I had a feeling he might go something soft,” he said. “Played out that way and I put a good swing on it.”

Cortes, who last pitched May 30 at Seattle before going on the injured list with a left rotator cuff strain, allowed one run — on Jose Altuve's tying 403-foot homer to leftfield in the third inning — and four hits in four innings in which he struck out eight. Cortes, on a pitch count in the range of 60 to 70 as Saturday served as a de facto third rehab start, threw 64 pitches, 43 for strikes.

“That’s Nestor right there at his best,” Aaron Boone said. “Obviously, he’s not built up, but that’s what it looks like.”

The Yankees (58-53), who remained  3 ½ games behind the Blue Jays for the American League’s third wild card but moved past the Red Sox into fourth place in the AL East, received dominant work from their bullpen. After  Cortes’ departure, Ian Hamilton, Tommy Kahnle and Michael King got the ball to Holmes, who earned his 16th save in 19 chances. The four relievers allowed no runs, one hit and three walks in five innings, striking out eight.

The 40-year-old Verlander, dealt from the Mets to the Astros before the trade deadline, did what he typically does against the Yankees: pitch well.

The righthander —  who entered the day 10-7 with a 3.24 ERA in 25 regular-season starts against the Yankees, including 5-0 with a 1.69 ERA in his previous eight outings against them — allowed two runs and seven hits  in seven innings. Verlander, 5-1 with a 2.62 ERA in the postseason against the Yankees, walked two and struck out four.

“Verlander pitched really well,” Torres said. “He’s a Hall of Famer. We always struggled to [be consistent] against him but today we tried to attack early and hit mistakes. We got a couple of opportunities and we took advantage.”

The first example of that came in the second. Isiah Kiner-Falefa led off with a single and Harrison Bader roped a double into the leftfield corner. Anthony Volpe’s sacrifice fly made it 1-0 and moved Bader to third, but Verlander struck out Ben Rortvedt swinging on a 3-and-2 pitch that was above the strike zone and got Bauers to line to right.

The 200th home run of Altuve’s career tied it — he hit a misplaced 1-and-2 cutter that was right down the middle — but Cortes allowed nothing else, and neither did the bullpen.

“It’s always good to beat a good team, and it’s not a secret to anybody: The Houston Astros are the Houston Astros,” Cortes said. “They’ve been there for a while now, so to come out here . . . Right now, we can split the series but hopefully we can come out and win it [Sunday]. That’s the reason we’re here, we’re trying to win games. Hopefully we’re able to turn it around in this second half.”