Yankees starting pitcher Gerrit Cole throws during the first inning of...

Yankees starting pitcher Gerrit Cole throws during the first inning of a game against the Angels in Anaheim, Calif., on Wednesday. Credit: AP/Ashley Landis

ANAHEIM, Calif. — First, Angel Stadium security had trouble putting the handcuffs on a fan who strayed onto the field, delaying the start of the bottom of the sixth inning by a couple of minutes.

Next, Yankees’ fielders seemed to lose their focus, committing two consecutive one-out errors.

Finally, Gerrit Cole appeared to lose his, delivering an inviting 2-and-0 fastball that reigning American League MVP Shohei Ohtani blasted out to centerfield. The three-run homer completely turned Wednesday night’s game around and sent the Yankees to a dispiriting 3-2 loss to the Angels in front of a sellout crowd of 43,555.

“It’s not like I’m thrilled about it, but I’m looking at it as an opportunity to pick the guys up,” Cole said of the errors. “You don’t want to be in that situation all the time, but it’s inevitable that you’ll be there, so it’s kind of like, ‘bring it on and let’s try to pick somebody up.’ And I would imagine the defense feels the same way if we’re making mistakes on the mound. Would have been nice to get out of that jam, but it’s unfortunate.”

Cole didn’t use the errors committed by Josh Donaldson and Isiah Kiner-Falefa or the delay as an excuse, nor did Aaron Boone.

“I don’t think it had an effect,” Boone said. “Tough play down the line by Donaldson, thought he made a good play to get a throw off . . . and then Izzy [Isiah Kiner-Falefa], a routine one and then falling behind Shohei and he got one in the center of the plate. Unfortunately, that turned out to be the game.”

The Yankees (79-52), after splitting four games against the awful A’s to start this three-city, 10-game trip, lost two of three to the slightly less-awful Angels (57-74) in seeing their AL East lead over the Rays trimmed to six games, the lowest the lead has been since it was six games on June 3. The Yankees, who were outhit 6-3 Wednesday, start a three-game series against the Rays at Tropicana Field Friday night.

One night after extending his Major League Baseball-leading homer to total to 51, Aaron Judge went 0-for-2 with two walks and two strikeouts. Judge worked a leadoff walk against righthander Jimmy Herget, against whom righties were hitting .200 with a .530 OPS this season, to open the ninth. With Giancarlo Stanton up, Judge stole second. Stanton walked, which brought up Donaldson, who struck out after getting ahead 1-and-0. Gleyber Torres struck out and rookie Oswaldo Cabrera, pinch hitting for Jose Trevino, grounded to second to end it.

“Herget’s tough against righties and Judgie and ‘G’ throw up two really good at-bats against him to give us a chance,” Boone said. “Herget started to make some really good pitches and we just couldn’t get to him there at the end. Tough one.”

Cole, 10-6 with a 3.31 ERA coming in, also entered the night 8-1 with a 2.47 ERA in 11 career starts against the Angels. The Yankees ace allowed three runs (two earned) and six hits over seven innings in which he walked one and struck out four to increase his MLB-leading total to 204.

He was in complete command going into the bottom of the sixth with a 2-0 lead but his night and that of the Yankees soon unraveled.

After the brief delay caused by the fan, which brought Boone out of the dugout to see what was going on and had Cole staring toward the incident in foul ground along the first-base side, the pitcher retired Max Stassi on a fly out to center.

David Fletcher followed with a ground smash down the third base line where Donaldson made terrific stop. But he threw low and a bit wide to first where DJ LeMahieu failed to come up with the ball, which skipped away, allowing the runner to take second.

Mike Trout then hit a routine grounder that Kiner-Falefa booted. Cole fell behind Ohtani 2-and-0 before the DH clobbered a 98-mph fastball to dead center, his 30th homer making it 3-2. “No excuses,” Kiner-Falefa said. “Play needs to be made in a big spot and it cost us the game tonight. Not happy about it. Definitely feel bad for Gerrit.”

Cole, meanwhile, lamented the pitch to Ohtani. “Just the worst fastball of the night,” Cole said. “Terrible spot. Just a bad miss. It stinks.”

More Yankees headlines