PHILADELPHIA -- Rey Fuentes picked an opportune time to hit his first career home run.

Fuentes belted a tiebreaking homer to dead center field in the top of the 10th inning to help lift the Arizona Diamondbacks to a 5-4 win over the Philadelphia Phillies on Sunday.

The Diamondbacks (44-26), completing a sweep of the Phillies (22-46), won their seventh straight. They're finding all different ways to do so.

Trailing 4-3 entering the ninth, Arizona took advantage of Philadelphia closer Hector Neris, who had trouble locating his pitches. He walked Nick Ahmed to start the inning before giving up a single to David Peralta that allowed Ahmed to advance to third. Gregor Blanco followed Peralta with a single to score Ahmed and knot it at 4.

Archie Bradley (3-1) picked up the win after working out of trouble in the bottom of the ninth. Fernando Rodney posted his 20th save while striking out the side in the 10th.

Jeanmar Gomez (3-2) was tasked with pitching the 10th for the Phillies. After getting a groundout to start the inning, Gomez left a changeup elevated and Fuentes hit his first home run in his 150th career plate appearance.

The Phillies took the lead in the sixth when pinch-hitter Ty Kelly smashed a go-ahead double to break a 3-3 tie and give the Phillies a 4-3 lead. Initially, the double scored two, but the Diamondbacks challenged the call and shortstop Freddy Galvis was ruled out at home plate.

Pat Neshek and Joaquin Benoit protected the one-run lead in the seventh and eighth, respectively, before Neris stumbled and cost starter Ben Lively a win.

Lively became the first Phillies pitcher since 2001 to start his career with four consecutive quality starts.

Lively struggled early. He allowed three runs in the first inning on two home runs, one by Paul Goldschmidt and one off the bat of Micah Owings. But he settled down, allowing three runs and eight hits. He walked one and struck out six.

Arizona's Robbie Ray wasn't at his best. He allowed four runs and eight hits in 5 1/3 innings. He walked four and struck out seven.

Ray entered having gone 5-0 in his last five starts, allowing one run in 37 innings. But the Phillies solved him early and scored a run in each of the first three innings.

Aaron Altherr and Maikel Franco hit solo home runs in the first and second innings, respectively. The Phillies tied the score at 3 in the third on an Altherr groundout into a double play.

While the Phillies were chipping away at Ray, Lively settled in. After the three-run first inning in which he threw 33 pitches, Lively surrendered just four hits in his next five innings, striking out five in the process. He entered the game with just five strikeouts on the year.

NOTES: Phillies 1B Tommy Joseph extended his hitting streak to 14 games, the longest active streak in the majors, with a single in the fifth inning. ... Arizona OF A.J. Pollock (strained right groin) played five innings Saturday night in a rehab start at Triple-A Reno. He was 1-for-2 with a double and a walk. Pollock has been on the disabled list since May 15. ... Both teams have an off day Monday. ... The Phillies play host to St. Louis in a three-game series starting Tuesday. The Diamondbacks head to Colorado. ... The Phillies and Diamondbacks meet again next weekend in Arizona.