Justin Turner homered twice and AJ Pollock, Will Smith and Edwin Ríos also went deep as the Los Angeles Dodgers rallied to beat the Angels 9-5 on Friday to open the first-ever season-closing Freeway Series.

The loss mathematically eliminated the Angels from postseason contention in Joe Maddon’s first season as manager, and gave the final AL playoff spot to the Houston Astros.

The Angels' longshot hopes had rested on sweeping the Dodgers in the Freeway Series and Houston losing its final three games. The Astros kept the Angels’ optimism flickering when they dropped a 5-4 decision at Texas in 10 innings. The Angels led 5-3 at the time.

Los Angeles Dodgers shortstop Corey Seager throws to first to put out Los Angeles Angels' Albert Pujols during the fifth inning of a baseball game Friday, Sept. 25, 2020, in Los Angeles. Second baseman Enrique Hernandez is at right. (AP PhotoAshley Landis)

Los Angeles Dodgers shortstop Corey Seager throws to first to put out Los Angeles Angels' Albert Pujols during the fifth inning of a baseball game Friday, Sept. 25, 2020, in Los Angeles. Second baseman Enrique Hernandez is at right. (AP PhotoAshley Landis)

But Turner hit a solo shot leading off the fifth and Max Muncy singled to chase Andrew Heaney. Smith followed with a two-run drive off Matt Andriese (2-4) that gave the Dodgers a 6-5 lead. It was the major league-leading 112th homer of the season for the team with the best record in baseball.

Corey Seager's diving stop of Mike Trout at short saved the potential tying run for the third out in the seventh. Trout earlier homered off Clayton Kershaw.

The Dodgers' victory allowed the Astros to finish second in the AL West and qualify for the 16-team postseason. Los Angeles lost to Houston in the 2017 World Series; the Astros' sign-stealing scandal was later exposed.

Los Angeles Dodgers starting pitcher Clayton Kershaw throws during the first inning of the team's baseball game against the Los Angeles Angels on Friday, Sept. 25, 2020, in Los Angeles. (AP PhotoAshley Landis)

Los Angeles Dodgers starting pitcher Clayton Kershaw throws during the first inning of the team's baseball game against the Los Angeles Angels on Friday, Sept. 25, 2020, in Los Angeles. (AP PhotoAshley Landis)

The Angels got homers from Trout, Justin Upton and Jared Walsh, but blew three leads in the game. Trout’s three-run drivet — his 17th of the season — gave them a 3-1 lead in the third. Trout's runs were unearned after Seager's fielding error. Seager was charged with a second error after dropping a foul ball by Shohei Otani in the ninth.

Turner's two-out solo shot landed in the Dodgers' bullpen in right, pulling them to 3-2 in the third. Pollock homered leading off the fourth to leave them trailing 4-3.

Walsh's homer led off the fifth, extending the Angels' lead to 5-3.

Los Angeles Angels starting pitcher Andrew Heaney throws during the first inning of the team's baseball game against the Los Angeles Dodgers on Friday, Sept. 25, 2020, in Los Angeles. (AP PhotoAshley Landis)

Los Angeles Angels starting pitcher Andrew Heaney throws during the first inning of the team's baseball game against the Los Angeles Dodgers on Friday, Sept. 25, 2020, in Los Angeles. (AP PhotoAshley Landis)

Pinch-hitter Joc Pederson had a RBI single with two outs in the seventh. Ríos homered with two outs in the eighth to make it 9-5. That snapped Mike Mayers' streak of 14 straight scoreless outings.

Brusdar Graterol (1-2) got the win with one inning of relief, allowing one run and one hit.

Kershaw tuned up for next week's NL wild-card series with a so-so performance. He gave up four runs — one earned — and eight hits on 78 pitches over four innings. He struck out three and walked none. The three-time NL Cy Young Award winner ended the regular season with a 2.16 ERA.

Los Angeles Dodgers' Mookie Betts turns to the dugout after scoring a double steal during the first inning of the team's baseball game against the Los Angeles Angels on Friday, Sept. 25, 2020, in Los Angeles. (AP PhotoAshley Landis)

Los Angeles Dodgers' Mookie Betts turns to the dugout after scoring a double steal during the first inning of the team's baseball game against the Los Angeles Angels on Friday, Sept. 25, 2020, in Los Angeles. (AP PhotoAshley Landis)

TRAINER'S ROOM

Angels: 2B Luis Rengifo was replaced by a pinch runner after singling leading off the seventh. Earlier, he took a foul tip off the protector on his lower leg and appeared to be in pain.

Dodgers: 1B Max Muncy was replaced in the seventh, apparently because of an issue involving his right hand or wrist.

FIRE ALARM

The game was delayed briefly with one out in the seventh when a fire alarm went off in the outfield pavilions, causing white lights to flash — a distraction to hitters — and a siren to wail. The players and umpires stood around looking at each other until it was shut off.

TURNER WINS CAMPANELLA AWARD

Justin Turner won the Roy Campanella Award for the third time, the first Dodger to do so.

The Dodgers uniformed personnel vote for the player who best exemplifies the spirit and leadership of the late Hall of Fame catcher, a three-time NL MVP who died in 1993. Campanella's daughter Joni Roan will present the award via video on Saturday night.

Turner has been a fixture in the Los Angeles community since joining the team seven years ago. From mid-March through June, he and his wife selected a restaurant and ordered an estimated 900,000 meals to be delivered to the Dream Center, which fed over 12,000 people at the height of the coronavirus pandemic. Turner visits hospital patients and supports homeless veterans through a golf tournament.

UP NEXT

Angels: RHP Dylan Bundy (6-3, 2.39 ERA) starts the middle game of the series. He's allowed three or fewer earned runs in nine of 11 starts this season.

Dodgers: RHP Tony Gonsolin (1-2, 1.77) makes his first career start against the Angels. He's 2-0 in five games (three starts) against AL teams with a 2.37 ERA.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports