Yankees starting pitcher Gerrit Cole throws to a Mariners batter...

Yankees starting pitcher Gerrit Cole throws to a Mariners batter during the first inning of a game Tuesday in Seattle. Credit: AP/Ted S. Warren

SEATTLE — The Yankees at last saw peak Gerrit Cole on Tuesday night, something they had not seen for the better part of the past month.

On the same Tuesday night in the Pacific Northwest, however, the Yankees also saw peak Luis Castillo, a reminder of what got away before the Aug. 2 trade deadline.

Both pitchers were brilliant and neither ended up with a decision as it was the bullpens — as well as some sketchy baserunning by the visitors — determining the winner nearly two hours after the pair were done.

It turned out to be the Mariners as they got a walk-off, one-out RBI single by Luis Torrens against Jonathan Loaisiga in the bottom of the 13th inning, sending the Yankees to a 1-0 loss in front of an electric crowd of 38,804 at T-Mobile Park.  

“Mistakes,” Aaron Boone said, referencing his club’s baserunning, particularly in extra innings. “It’s been one of the real strengths of this team, so I don’t want us to lose our aggressiveness, but obviously we have to be a little smarter … Crappy way to end the night.”

The Yankees (71-40), who snapped a five-game losing streak Monday night, fell to 1-4 on this three-city, nine-game trip. With the loss, the Astros tied them atop the American League overall standings.

“Tonight was just a well-pitched game by both sides,” said Cole, who allowed four hits over seven scoreless innings in which he struck out eight, lowering his season ERA to 3.38. “Probably, if you’re walking [away] from this one, you’re probably like, man, I wish maybe we didn’t make so many outs on the bases.”

Indeed, the Yankees did not distinguish themselves in that area, getting five runners thrown out total, four in the extra frames.

“Definitely need to do a better job on the basepaths,” said Isiah Kiner-Falefa, who was one of those four. “We’ve tried to be aggressive all year and tonight it kind of backfired on us a little bit.”

Neither team distinguished itself on offense against the bullpens as Cal Raleigh's single to start the bottom of the 13th was the first hit by either team since the eighth inning.

The Yankees loaded the bases with one out in the top of the 13th against righty Matt Brush but Gleyber Torres struck out and Miguel Andujar, brought up earlier in the day to replace the injured Matt Carpenter on the roster, grounded to short. This coming after Lou Trivino struck out Eugenio Suarez with the bases loaded in the bottom of the 12th, causing the third baseman to snap the bat over his knee in frustration.

Suarez started the 13th at second and went to third on Raleigh’s single to right. J.P. Crawford hit a comebacker to Loaisiga for the first out and Sam Haggerty was intentionally walked to load the bases for Torrens, a former Yankees farmhand. He fell behind 0-and-2 before delivering the game-winner to right.  

The Yankees ran themselves out of the top of the 10th inning when, after Paul Sewald hit leadoff man Josh Donaldson, automatic runner Andrew Benintendi was caught stealing third when the pitcher stepped off the rubber. Pinch runner Tim Locastro did make it to second on the play but Torres hit a weak comebacker to Sewald and Andujar struck out.

In the 11th, Aaron Hicks got ahead of Matt Festa 3-and-0 before lining a 3-and-1 pitch to second, where Adam Frazier made the catch, then doubled Andujar, the automatic runner, off second.

Raleigh started the bottom half at second against Wandy Peralta and went to third on Crawford’s sacrifice bunt. But Peralta got pinch hitter Carlos Santana to ground into an inning-ending 1-6-3 double play.

In the 12th, Jose Trevino started on second but was cut down when Brush made a behind-the-back stop of a Kiner-Falefa comebacker. After Trevino was tagged out, the Mariners did the same to Kiner-Falefa trying for second (the shortstop ran out of the baseline and was called out) to complete another double play. It ultimately kept Aaron Judge from getting up as DJ LeMahieu struck out.

“You’ve got to get to second,” Kiner-Falefa said. “There’s a rundown [between] second and third, common baseball knowledge is you get to second. It just didn’t work out tonight. If that happens, you have to be on second base.”

Cole, 0-2 with a 7.00 ERA in his last three starts, including his previous outing Aug. 3 vs. Seattle when he allowed six first-inning runs in a 7-3 loss at the Stadium, was terrific Tuesday.

Castillo, a trade target of the Yankees whom they went aggressively after but ultimately didn’t want to give up the prospects the Reds were looking for, made it three straight dominant efforts against the Yankees this season. Tuesday night, he struck out seven and walked two over eight innings in which he allowed three hits, lowering his ERA to 2.71.

“He’s a bulldog,” Cole said of Castillo. “Always attacking the zone, good command of the fastball. He’s added the four-seam this year, which has given him a really different look. He’s got two off-speed weapons, he can throw four pitches for strikes … You can see why we were pushing hard for him and why the Mariners decided to go over the top to get him.”

Andres Munoz took over for Castillo in the ninth and struck out the side: LeMahieu, Judge and Benintendi.

The Yankees actually hit Castillo hard in the first inning. LeMahieu led off with a one-hop smash that first baseman Ty France went to his knees for in making the stop before flipping to the pitcher covering first. Judge connected well but his liner fell right into the glove of leftfielder Jake Lamb. Benintendi, who doubled twice Monday night, singled sharply to center, then stole second. But Donaldson, coming off a 4-for-5 night Monday, struck out swinging at a 98-mph sinker to end the 17-pitch inning.

Cole pitched a 1-2-3 bottom half, ending the 13-pitch inning by getting Mitch Haniger looking at a 99-mph fastball.

The Yankees would not get another runner in scoring position until the eighth.

The Mariners put their first runner in scoring position with one out in the fifth when Raleigh, who just missed a homer in the second — the ball hooking foul at the last moment — before striking out, doubled to right. Cole, however, got Crawford to pop out and Haggerty, whose walk-up music is the theme from “The Godfather” in order to honor his Italian heritage, to fly to right.

More Yankees headlines