SEATTLE (AP) Justin Upton is enjoying his change of scenery into the midst of a playoff race.

Upton had a two-run double in the eighth inning to help Los Angeles avoid a sweep with a 5-3 win over the Seattle Mariners on Sunday, moving the Angels one game out of the second wild card spot.

"It's exciting," said Upton, acquired from Detroit on Aug. 31. "These guys don't know me very well, but we're getting to know each other. To finally get a big hit and help the team win a ballgame, it's exciting."

Mike Trout and Luis Valbuena had solo homers as Los Angeles moved a game behind Minnesota, which lost 11-3 to Kansas City.

Ben Rivera opened the eighth with a pinch-hit single to center off Nick Vincent (3-2), who relieved to start the inning. Brandon Phillips' sacrifice moved Rivera to second and Trout was walked intentionally. Upton followed with a double to the gap in left-center to make it 4-2.

"Those situations are fun," said Upton, who raised his season RBI total to 99. "Tie ballgame and you've got a chance to put your team ahead. You don't always come through, but when you do, it's fun."

Jean Segura opened the bottom half with his ninth homer to pull Seattle to 5-3.

Cam Bedrosian (6-4) pitched a scoreless seventh for the victory. Blake Parker struck out the side in the eighth after Segura's homer, and Yusmeiro Petit closed with a perfect ninth for his third save.

"Offensively, I thought we hit some balls really good today," said Mariners manager Scott Servais. "Unfortunately, we hit them to Mike Trout in center field, the deepest part of the ballpark."

Valbuena brought the Angels even at 2-2 with a two-out solo homer off starter Erasmo Ramirez in the seventh, his 19th.

Seattle, which remained three games back in the wild-card chase, erased a 1-0 deficit with two runs in the second off Parker Bridwell. Kyle Seager doubled to open and advanced to third on Mitch Haniger's single. Haniger was thrown out trying to steal second, but Ben Gamel followed with a triple when his fly ball to the gap fell between left fielder Justin Upton and center fielder Trout. Mike Zunino singled in Gamel.

"When people get on, that's all you can do," said Bridwell, who allowed just two singles over the next four innings. "Just give up those two runs and look to minimize the rest.

Trout put the Angels up 1-0 in the first with his 28th homer, a one-out solo shot to center.

TRAINER'S ROOM

Angels: LHP Andrew Heaney left Saturday's game in the third inning with a sore shoulder, but it is not known if he will miss his next scheduled start.

Mariners: RHP Felix Hernandez (right shoulder bursitis) and LHP James Paxton (strained left pectoral muscle) are scheduled to return during the upcoming road trip. Hernandez (5-4, 4.28) is scheduled to start Thursday at Texas, followed by Paxton (12-3, 2.78) on Friday at Houston. Both Hernandez and Paxton are expected to have limited pitch counts initially. "The biggest thing is get those guys out there, hopefully if they feel good and healthy and then build upon that one for the next one," manager Scott Servais said. "We're looking at those guys making four starts for us and hopefully all four are really important."

UP NEXT

Angels: After a day off Monday, the Angels open a three-game series at home against Houston. RHP Garrett Richards (0-0, 1.13) makes his second start after missing 135 games on the DL with a right bicep strain suffered in the season opener. In his first start back, Richards allowed one run on four hits in 3 1/3 with three strikeouts and one walk in a 52- pitch outing against Oakland.

Mariners: LHP Ariel Miranda (8-6, 4.72) makes his team-leading 29th start to open the four-game series at Texas on Monday. In his last start, he pitched six hitless innings, but walked six. Miranda has a no-decision in eight of his last 11 starts.