ANAHEIM, Calif. - The Yankees' offense spent a fourth straight game resembling the Mets', but on this day it didn't matter.

Getting an outstanding start by Nathan Eovaldi and mostly solid work from their bullpen, the Yankees averted a three-game sweep by the Angels with a 3-1 victory Wednesday in front of 40,938 at Angel Stadium of Anaheim.

The Yankees (42-38), who are off Thursday after playing 20 consecutive days, finished the trip 3-4 and actually managed to pick up a half-game in the mediocre AL East.

"The division's extremely close,'' said Joe Girardi, whose club trails the first-place Orioles by one-half game and leads the Rays and Blue Jays by one-half game. "I expect it to be that way the whole year. It's not what we wanted, but 3-4's a lot better than 2-5.''

Eovaldi (8-2) shut out the Angels (41-38) for 51/3 innings before loading the bases. Lefty Chasen Shreve got out of the jam, then threw a perfect seventh. "It gets your adrenaline going, for sure,'' said Shreve, who hasn't allowed a run in 15 consecutive appearances and has retired 56 of the last 67 batters. "But I just try to stay focused and make my pitches.''

Justin Wilson, another lefthander, retired the first two batters of the eighth before Mike Trout hit his 21st homer to make it 3-1.

advertisement | advertise on newsday

Dellin Betances came on and retired Albert Pujols. Betances started what turned out to be a jittery ninth by walking Erick Aybar, who stole second. He got David Freese to pop to first and struck out Daniel Robertson but walked Chris Iannetta, bringing up C.J. Cron as the potential winning run. Betances got ahead of Cron 0-and-2 before striking him to record his seventh save.

The Angels' Michael Shoemaker (4-7) allowed two runs and seven hits in 52/3 innings.

The Yankees, who had 12 hits but stranded 10, went ahead 1-0 in the third. Didi Gregorius led off with a single and came in on a single by Chase Headley, 2-for-23 to that point on the trip.

Freese and Matt Joyce led off the fifth with singles but Eovaldi got Iannetta to ground into a 5-4-3 double play. Efren Navarro grounded to second to end the inning.

"My split's been a lot better for me,'' said Eovaldi, who has won three in a row since a brutal June 16 outing in Miami in which he allowed eight runs in two-thirds of an inning.

Yankees videos

After Garrett Jones' fifth homer, a long blast to right in the sixth, made it 2-0, Eovaldi got into trouble in the bottom half. Johnny Giavotella started it with a single and, after Kole Calhoun struck out, Eovaldi walked Trout, bringing up Pujols. The slugger, coming off a June in which he hit 13 homers to give him 24, walked on four pitches to load the bases.

Girardi called on Shreve to face the switch-hitting Aybar. Shreve fell behind 1-and-0 before getting him to pop to short for the second out. He retired Freese on a grounder to third, with Mark Teixeira making a good scoop on Headley's throw in the dirt that saved one run, if not two.

"We didn't play great [on the trip] but we played two good teams,'' Teixeira said. "We could definitely hit more, but we've been scoring runs all year, so we know that's going to come back.''