ANAHEIM, Calif. (AP) -- David Peralta hit a tiebreaking homer in the eighth inning, and the Arizona Diamondbacks blew a seven-run lead before rallying for a 9-8 victory over the Los Angeles Angels on Tuesday night.
Longtime Angels outfielder Kole Calhoun had two homers, three hits and a career-high five RBIs in his return to Angel Stadium with the Diamondbacks, who hung on for their third win in 10 games after leading 8-1 in the fifth.
Calhoun homered in his first two at-bats as a visitor in the stadium where he patrolled right field for the first eight years of his big league career before leaving for his hometown Diamondbacks last winter.
''Pretty cool, man,'' Calhoun said. ''The first one was kind of surreal, first time back, old team, hit a homer. And then the second one, this is crazy. Crazy game, crazy night. Just very grateful for that opportunity to play here again and get a win against your former team. Pretty cool.''
Justin Upton and Jared Walsh homered for the Angels, whose playoff hopes are increasingly dim after this loss in the opener of their final homestand. The Halos have lost four of their last seven with a chance to gain ground on flagging Houston for second place in the AL West.
''The whole time, we thought we could come back in that ballgame,'' Angels manager Joe Maddon said. ''We had a great vibe. We battled and got back into it. We were in good position to win it, and we didn't do it.''
Madison Bumgarner yielded a career-high 13 hits and matched his career worst with eight runs allowed in his first appearance against the Angels. The veteran left-hander blew a seven-run lead and stayed winless with the Diamondbacks, who left him in the game far longer than expected.
Bumgarner said the start was ''really weird. I threw a lot of strikes, but not a lot of good strikes.''
''I don't care if we go out and win 10-8 every time I pitch,'' Bumgarner added. ''We're here to win games. That's what it's all about. But ideally, I'd like to make it a little easier on everybody.''
After Peralta connected off former Arizona pitcher Matt Andriese leading off the eighth for his fourth homer, Arizona's bullpen completed 3 2/3 innings of hitless ball. Keury Mella (1-0) pitched the seventh for his first major league victory, and Stefan Crichton worked the ninth for his second save.
Carson Kelly and Daulton Varsho also homered for the Diamondbacks.
Calhoun's second homer put Arizona up 7-0 in the third, but the Angels steadily rallied against Bumgarner. Walsh homered for the fifth time in six games and added a two-run double before Anthony Rendon and Upton drove in runs in the fifth.
Taylor Ward, Andrelton Simmons and David Fletcher then delivered three consecutive doubles in the sixth, with Simmons scoring the tying run. Arizona manager Torey Lovullo still left Bumgarner in for one more batter before pulling him with his ERA ballooned to 8.53.
''I think with him coming back from the injury and working hard to make that happen, working through summer camp, it probably hasn't been the type of year he wanted,'' Lovullo said. ''But my concern is minimal. I know what he's capable of doing. I know he can go out and make pitches when he has to. ... He's an easy bet. He's done it a long time.''
The Diamondbacks chased Julio Teheran after two innings. The disappointing veteran remained winless with Los Angeles after yielding four runs on three hits, all homers.
''You throw balls in the middle, they're going to hit it pretty hard,'' Teheran said.
Calhoun hit 140 homers and played stellar defense during his time at the Big A, which played a tribute video to the empty seats after the first inning - and which Calhoun acknowledged with a joking curtain call.
Calhoun had five multihomer games with the Angels, but never drove in five runs in his 966 appearances over eight seasons.
The Angels' Dylan Bundy (5-2, 2.48 ERA) makes the 10th start of his outstanding season looking to improve to 3-0 in three career starts against the Diamondbacks. Arizona counters with Caleb Smith (0-0, 3.00 ERA), who threw three solid innings in his debut with the team last week.
More AP MLB: https;//apnews.com/MLB and https://twitter.com/AP-Sports