SEATTLE (AP) — Justin 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.

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.

Upton advanced on Albert Pujols' fly out and scored on a wild pitch by Marc Rzepczynski.

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 Yosmeiro Petit closed with a perfect ninth for his third save.

More From 1460 ESPN