ANAHEIM, Calif. — Shohei Ohtani knows what's possible after Tommy John surgery from watching Andrew Heaney's pitching performances this season for the Los Angeles Angels.

At the plate, Ohtani keeps doing things that aren't possible for many other sluggers.

Ohtani hit a tiebreaking homer in the eighth inning, sending the Angels to a 3-2 victory and a three-game sweep of the Texas Rangers on Wednesday night.

Although he is scheduled for elbow ligament replacement surgery next week, Ohtani is still slugging away. He matched his professional single-season high for homers after hitting 22 in Japan two seasons ago.

"It's two completely different things — different countries, different pitchers, different ballparks, different balls," Ohtani said. "But being able to accomplish my career high in my first year in the big leagues, it was a huge thing for me. I'm proud of that."

Ohtani had an early RBI single before he connected off Rangers reliever Chris Martin (1-5), his former teammate in Japan with the Hokkaido Nippon-Ham Fighters. The two-way rookie went the opposite way, bouncing it off the top of the left-field wall.

"He's a special hitter," Texas interim manager Don Wakamatsu said. "He's pulling balls down the right-field line. Then you put a ball a little elevated out and away, (and) he takes it away. It shows you what kind of leverage he has with that body."

The Angels were in position to win because of Heaney, who struck out 10 and yielded two runs over seven innings in a strong finish to the Angels left-hander's first full season back from Tommy John.

"He was very solid throughout the whole year, very consistent," Ohtani said of Heaney. "I'm really impressed by how he was able to stay healthy and finish the season strong."

After making just six starts in the previous two years, Heaney was the only consistently successful starter in Los Angeles' injury-wracked rotation this season. While pitching 180 innings, he became the first Angels left-hander to surpass 175 strikeouts since C.J. Wilson did it in 2013, and his 100 pitches against the Rangers were the most by any Angels pitcher since July 22.

"I'm happy I kept us in it," Heaney said. "Other than the first couple of weeks (of the season), being able to take the ball every fifth or sixth day, that's what every pitcher wants to do. I think there's still a lot of juice to be squeezed ... but I'm proud of that."

Taylor Ward also homered for the Angels (78-81), who need three more victories in their season-ending series with Oakland to avoid having three consecutive losing seasons for the first time since 1992-94.

Jose Alvarez (6-4) pitched a perfect eighth inning in his 76th appearance of the season. Jim Johnson pitched the ninth for his second save.

Adrian Beltre and Jurickson Profar homered for the Rangers, who have lost four of five and eight of 10.

Justin Upton doubled for the Angels' first hit in the fourth inning and scored on a single by Ohtani, who has driven in runs in three consecutive games.

ADRIAN'S BELT

Beltre crushed his 15th homer of the season over the ficus trees in centre field in the second inning, giving him eight homers in September during a fitting finish to what could be the final season of his remarkable career.

"That's the idea, but I don't think as a team we are doing a good job right now," Beltre said. "Obviously as a team we want to finish strong, but individually I'm feeling a little better."

The RBI was the 39-year-old Beltre's 1,704th, moving him even with Frank Thomas for 22nd in baseball history. He has 48 homers and 168 RBIs against the Angels, both tops for any opponent in his career.

"You look up at the record books and he just keeps climbing in every category," Wakamatsu said. "There is no mystery why he's where he's at. The work ethic, the character, the intelligence, it's everything he puts in."

Beltre hasn't decided whether to play again next season, but he got a warm send-off from his Dallas-area fans last weekend just in case.

TRAINER'S ROOM

Rangers: SS Elvis Andrus was shaken up in the fifth inning when he broke his bat and hit himself in the back of the head with the barrel on his follow-through. Andrus didn't really run to first while he was thrown out, and he walked gingerly back to the dugout, but stayed in the game.

Angels: Reliever Ty Buttrey has been shut down for the season with right knee bursitis, Scioscia revealed after the game. Buttrey had been the Angels' closer recently, and he has a 3.31 ERA and four saves since arriving in a midseason trade.

UP NEXT

Rangers: Ariel Jurado (4-5, 6.66 ERA) takes the mound Thursday when Texas opens a four-game series at Seattle to close the regular season.

Angels: After a day off, Jaime Barria (10-9, 3.54 ERA) will make the last start of his impressive rookie season Friday when the Angels open their final series at home against the Oakland Athletics.

___

More AP MLB: www.apnews.com/tag/MLB and www.twitter.com/AP_Sports