PHOENIX — Eduardo Escobar and Alex Avila both homered and drove in three runs, and the Arizona Diamondbacks came from behind for an 8-4 victory over the Philadelphia Phillies on Tuesday night.

David Peralta also homered for Arizona, which has won three of four as it fights for a National League wild-card spot.

The Diamondbacks scored five runs off Phillies relievers Ranger Suarez and Blake Parker and turned a 3-2 deficit into a comfortable lead. Andrew Chafin (1-2) worked two-thirds of an inning to get the win, with Suarez (3-1) the losing pitcher.

Mike Leake, in his Diamondbacks debut after being acquired in a trade with the Seattle Mariners on July 31, allowed two earned runs on 11 hits. The Diamondbacks won despite committing three errors, two by first baseman Christian Walker.

Philadelphia's Jake Arrieta left with a lead, charged with two runs on five hits with five strikeouts in five innings. Adam Haseley had a career-high three hits for the Phillies and drove in two runs, and Jean Segura added three hits.

It didn't start well for Leake, who played in college at nearby Arizona State. Corey Dickerson ripped Leake's third pitch of the game into the overhang in right centre field for his seventh career leadoff home run.

Nick Ahmed's attempt to throw out Jean Segura on a grounder wide of shortstop resulted in a two-base error in the fourth inning, and Segura came home on Haseley's single for a 2-0 lead.

The Diamondbacks drew even at 2 in the bottom of the fourth. Ketel Marte led off with a single — his National League-leading 139th hit of the season — and scored on Escobar's home run to right field.

Bryce Harper's diving catch in the bottom of the fifth with runners on second and third prevented at least one run from scoring on Marte's blooper to shallow right field. Arrieta got out of the inning unscathed with a 3-2 lead.

Harper had a chance to add to the Phillies' lead in the sixth, but struck out swinging against Chafin to end the inning. The Phillies left 10 men on base.

Avila singled with the bases loaded off Suarez in the bottom of the sixth to drive in two and give the Diamondbacks the lead for good. Escobar's RBI single in the seventh made it 5-3 before Peralta's 10th home run sailed high into the right field seats.

DYSON TOSSED

Diamondbacks outfielder Jarrod Dyson was ejected with two strikes on him in the bottom of the eighth. He argued with home plate Tom Hallion over a called strike and had a heated exchange before leaving the field.

LINER NOTE

Arrieta's quick reflexes helped him catch Dyson's line drive up the middle in the third inning, which turned into a double play when Avila was caught off first base.

TRAINER'S ROOM

Phillies: OF Jay Bruce could be back at some point during the Phillies' series at San Francisco later this week. He's been on the 10-day injured list with a strained right oblique since July 17.

Diamondbacks: 3B Jake Lamb was back in the lineup after landing hard on his shoulder trying to get to a ground ball past third base Monday night.

UP NEXT

Phillies: LHP Jason Vargas (6-5, 3.93 ERA) faces the Diamondbacks in his second start since being traded from the New York Mets on July 29. Vargas is 2-3 with a 6.82 ERA in six career starts against Arizona and is two wins away from 100 his career.

Diamondbacks: RHP Zac Gallen (1-3, 2.72) makes his Arizona debut after coming over in a trade with the Miami Marlins on July 31. He's allowed two runs or fewer in six of seven starts this season.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports