ANAHEIM, Calif. — The Los Angeles Angels acquired slugging outfielder Justin Upton from the Detroit Tigers on Thursday, upgrading their lineup for the playoff race.

The Angels also allowed Cameron Maybin to leave on a waiver claim by the Houston Astros, clearing the way for Upton to take over in left field.

The 30-year-old Upton is having a strong season for the struggling Tigers, batting .279 with 28 homers and 94 RBI.

He represents an immediate upgrade in left field for the Angels (69-65), who are still fighting for a playoff spot despite several major injuries to their pitching staff and one of the AL’s least potent lineups.

The four-time All-Star signed a six-year, $132.75 million deal to join Detroit before last season. Detroit agreed to pay the Angels $747,951 to cover a portion of the $3,747,951 remaining in Upton’s $22,125,000 salary this year.

His deal includes four more seasons at the same salary, but he can opt out after the World Series and become a free agent.

The Angels sent minor-league pitcher Grayson Long to Detroit, which also gets cash considerations or a player to be named. Long was among the Angels’ better prospects after posting a 2.52 ERA in 23 Double-A starts this season.

Maybin has been relatively solid by the low standards for an Angels left fielder, batting .235 with 22 RBI and 29 stolen bases in 93 games. He joined the Angels last winter in a trade with Detroit. Houston will be his sixth big-league club.

RANGERS: Third baseman Adrian Beltre will have an MRI on Friday to determine the extent of a strained left hamstring that could threaten to end his 20th MLB season only weeks after getting his 3,000th career hit.

Beltre was injured when fielding a slow short hopper in the seventh inning of the Rangers’ 5-1 loss to Houston on Thursday. Beltre took a couple of steps after fielding the ball and it became immediately clear when he hopped up awkwardly without trying to make a throw that something was wrong.

“It’s not good,” a clearly distraught Beltre said afterward about his level of pain.

When asked if he thought he could play, the 38-year-old third baseman responded, “As of now, I don’t think so. … Let’s see what happens tomorrow with the MRI, and then we take a couple of days and see how it goes.”

Beltre missed the first 51 games this season because of calf issues. In 80 games played since making his debut May 29, Beltre is hitting .315 with 16 homers and 66 RBI. He became the 31st player in major league history to reach 3,000 career hits when he doubled in a home game July 30 against Baltimore.