Coming off his first loss in 18 starts, Carlos Zambrano appeared to be in trouble again when Justin Upton hit a two-run homer that nearly landed in a restaurant at the back of the second deck.

The long drive turned out to be just what Zambrano needed to snap back into form.

The right-hander settled in after Upton's first-inning homer to bounce back from a shaky outing, and Alfonso Soriano hit a pair of leadoff homers that lifted the Chicago Cubs to a 4-2 win over the Arizona Diamondbacks on Friday night.

"After the cheap home run by Upton ... I thought he got more pop than that," Zambrano joked. "But, seriously, after that I said, 'That's all they can get, let's just pitch the game.'"

Zambrano (3-1) was roughed up in his previous start, giving up six runs in five innings to the Dodgers on Sunday, ending his winning streak at 10 games. Big Z responded with an impressive performance against the Diamondbacks, scattering three hits over the next five innings to win his ninth straight road start.

Soriano provided the offense, continuing his strong start to the season by leading off the fifth and seventh with homers against Armando Galarraga (3-2).

Geovany Soto hit a solo shot of his own, Aramis Ramirez squibbed in an insurance run on a fielder's choice against Esmerling Vasquez in the eighth and Carlos Marmol cleaned up in the ninth for his sixth save in eight chances.

The Cubs played solid defense, too, putting together one of their best games of the season to end a four-game losing streak.

"This was real good coming off losing four in a row and everything else," manager Mike Quade said. "A real good effort."

Arizona took a step toward erasing its first-inning woes this season against the Cubs in the series opener on Thursday, scoring seven runs — four on Stephen Drew's grand slam — off Ryan Dempster on the way to an 11-2 win. The Diamondbacks had been outscored 26-9 in the opening frame the previous 23 games.

Arizona did it again against Zambrano, though not as emphatically, getting two runs in the first on a homer by Upton that had people moving their drinks at the back of the second deck in left. The shot, estimated at 455 feet, was one of three hits for Upton.

The Diamondbacks just couldn't get much else going against Zambrano or anyone else, going 0 for 7 with runners in scoring position.

"Give Zambrano a little bit of credit; he threw a pretty good game," Diamondbacks manager Kirk Gibson said. "He handled us when we had opportunities."

Galarraga was solid through the first four innings, scattering three singles, including two that didn't get out of the infield.

He found trouble to start the fifth, when Soriano dug out a 1-2 breaking ball from just above the dirt and lined it over the wall in left-center. Soto followed with a no-doubt shot in the same vicinity, giving Chicago back-to-back homers for the first time this season.

Soriano did it again in the seventh, hitting Galarraga's first pitch just over the wall in right-center for his ninth of the season to put the Cubs up 3-2.

Galarraga was lifted for a pinch-hitter in the seventh after allowing three runs and six hits. Decent, but Zambrano — and Soriano — were just a little better.

"I have to try and make better pitches, but tonight I really liked the two pitches I threw to Soriano," Galarraga said. "They were good pitches."

NOTES: Chicago 1B Carlos Pena, stuck in a 2-for-25 slump, was held out of the lineup and entered the game as a defensive replacement in the ninth inning. ... Soriano has 27 career multihomer games. ... Arizona had scored 21 runs in 21 innings for Galarraga in his first four starts. ... Chicago's pitching staff leads the NL with 103 walks after Zambrano walked three.