ANAHEIM, Calif. (AP) Justin Upton hit a tiebreaking sacrifice fly in the eighth inning, and the Los Angeles Angels avoided a sweep by topping the Oakland Athletics 6-5 on Sunday.

Los Angeles won for just the second time in seven games since three-time AL MVP Mike Trout went on the injured list with a calf strain. It trailed 4-1 after five innings.

Jared Walsh homered for the Angels, and Shohei Ohtani tied the game with a pinch-hit sacrifice fly in the seventh. Raisel Iglesias (3-2) pitched 1 1/3 innings for the win.

''I know from the outside it doesn't look the greatest but these guys are fighting every single day,'' said Upton, who was in the leadoff spot for the first time in his career. ''We feel that we have put ourselves in position for a win and it just hasn't worked out for us. ... Hopefully this will spark the club.''

After giving up six homers in the first two games of the series, five Angels relievers held the A's to a lone unearned run over the final 6 2/3 innings.

''Dylan did not have his typical day so here comes the bullpen, much maligned, and these guys did a great job,'' Angels manager Joe Maddon said. ''All we need to do with this group is to get their confidence going. They're very talented, we just don't have that mojo, that confidence.''

Matt Olson and Seth Brown homered for AL West-leading Oakland, which had won four of six. Sean Murphy had a run-scoring infield single in the eighth.

A's starter Sean Manaea permitted one run and four hits in five innings. He struck out six and walked two.

Deolis Guerra (1-1) was charged with the loss, yielding one run in one inning.

Angels starter Dylan Bundy lasted just 2 1/3 innings. He was charged with four runs and five hits.

Walsh's 10th homer trimmed Oakland's lead to 4-2 in the sixth, and the Angels added three more in the seventh.

Angels pinch-hitter Jose Rojas singled home a run against Sergio Romo. After Anthony Rendon walked to load the bases, Ohtani was sent up to bat for Juan Lagares and hit a sac fly to right off left-hander Reymin Guduan.

Jose Iglesias then made it 5-4 when he singled home Rojas.

Gudan faced Ohtani because high-leverage A's left-hander Jake Diekman was given a day off.

''We deemed him unavailable,'' A's manager Bob Melvin said. ''It would have been three days in a row for him and we have quite a workload on all those guys at this point. Sometimes other guys have to pitch.''

Olson and Brown went deep in the second inning against Bundy. Oakland hit nine home runs in the series, running their AL-best total to 68 on the season.

The A's went 7-5 in a stretch of four consecutive series played in four different cities.

Olson's home run, his 12th of the season and second of the series, went to right field leading off the second. After Bundy walked Matt Chapman, Brown sent another drive deep to right for a 3-0 lead. It was Brown's eighth of the season, and he also had two in the series.

''You want to leave town with three wins but we set goals to win series so we say, 'Hey, we won the series,''' Murphy said. ''But give credit to them. They didn't just roll over and let us have one. Tough game sometimes.''

OBSERVATION DAY

With an off day Monday, the Angels were trying to give Ohtani a two-day break by taking him out of the starting lineup, although he still came through with his sacrifice fly and finished the game in right field.

Ohtani entered Sunday tied for the American League lead in home runs with 14.

After slightly diminished velocity numbers in his start Wednesday against Cleveland, Ohtani's next start on the mound won't come until Friday at Oakland, although Maddon said there was not an injury concern.

''I just wanted him to come to the ballpark a little more slowly (Sunday) and if we need you we'll use you, otherwise not,'' Maddon said. ''He's going to have a busy week this week so I thought it would be the right thing to do.''

TRAINERS ROOM

A's: OF Mark Canha was not in the lineup a day after he was hit in the left elbow by a pitch and came away with swelling and discomfort. Melvin expects Canha to return Monday. ... LHP Jesus Luzardo (finger) threw a 51-pitch bullpen session and the team is determining its next move.

Angels: RHP Chris Rodriguez (shoulder) threw a bullpen session over the weekend, with Maddon saying it went well but the team is being cautious with his return.

UP NEXT

After an off day Monday, the Angels will send left-hander Andrew Heaney (1-3, 5.31 ERA) to the mound Tuesday in the opener of a three-game series at home against the Texas Rangers. The A's will return home Monday and open a three-game series against the Seattle Mariners with right-hander Frankie Montas (5-3, 4.79 ERA) on the mound.

Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.