Phoenix, AZ (SportsNetwork.com) - Anthony Rizzo blasted a three-run homer in the top of the ninth inning as the Chicago Cubs rallied to beat the Arizona Diamondbacks 9-6 on Saturday at Chase Field.

Rizzo also hit a three-run double for the Cubs, who tied the game at 6-6 on Jorge Soler's two-out, two-run double in the eighth.

"They got us last night, Riz got them tonight, tremendously big at-bats. We needed that," Cubs manager Joe Maddon said.

Chicago ended a six-game losing streak to Arizona and won for the third time in its last four games.

David Peralta had a bases-clearing double for the Diamondbacks, who overcame a two-run deficit and blew a pair of two-run leads. They had their season-high win streak snapped at five games.

Catcher Tuffy Gosewisch, who made a spectacular diving on a bunt attempt, hit a solo home run in the sixth for a 6-4 Arizona lead. But Chicago battled back against the D-backs bullpen.

After tossing a 1-2-3 seventh, J.C. Ramirez retired the first two Cubs batters in the eighth before Starlin Castro singled to right field. Oliver Perez then hit Miguel Montero with a pitch before giving up Soler's double to the right- center field gap.

"The mistake was not having (Daniel) Hudson ready for Soler. That was a mistake," said Arizona manager Chip Hale.

In the ninth, Dexter Fowler hit a one-out single and Kris Bryant reached on a fielding error by third baseman Yasmany Tomas. Rizzo followed with the go- ahead drive to right-center field off Enrique Burgos (0-2).

Pedro Strop set the D-backs down in order in the bottom of the ninth to earn his first save of the season. Rizzo's home run made a winner out of Jason Motte (2-1), who recorded the final two outs in the eighth.

Tomas hit a two-run single off Chicago starter Jake Arrieta in the first, and the score remained the same until the fifth.

The Cubs loaded the bases against D-backs starter Rubby De La Rosa, who hit Bryant on his padded left elbow to force in a run. Rizzo then cleared the bases with a double to left for a 4-2 Chicago lead.

Arizona quickly responded by loading the bases in the bottom of the fifth and regained the lead on Peralta's two-out hit.

Game Notes

Aaron Hill played in his 400th game at second base Saturday to move into sole possession of first place for most games at the position in Diamondbacks history. Hill passed Orlando Hudson, who played for Arizona from 2006-08 ... Bryant extended his hitting streak to 12 games. It's the longest by a Cubs third baseman since Aramis Ramirez's 16-game streak in August 2011 ... Arrieta gave up six runs -- three earned -- on seven hits, walked two and struck out seven in six innings ... De La Rosa allowed four runs on four hits and walked two while striking out eight in six innings.