PITTSBURGH (AP) Javier Baez is learning, and Saturday was another good day for the touted prospect.
Baez and fellow rookie Matt Szczur homered, and the Chicago Cubs snapped a seven-game losing streak with a 6-4 victory over the Pittsburgh Pirates.
Baez connected for a two-run shot in Chicago's three-run third, and Szczur hit a leadoff drive in the eighth for his first career homer. It was Baez's second homer in two nights and No. 9 on the season.
Baez is 4 for 15 with two homers and three RBIs in his last four games after going 6 for 62 with 28 strikeouts during a prolonged slump for the 21-year-old infielder.
''I'm just trying to go up to the plate with a good approach,'' Baez said. ''I've been working with (hitting coach Bill Mueller) and trying to have better at-bats. I've felt more comfortable the last few days.''
Felix Doubront (2-1) pitched six scoreless innings for the Cubs in his third start since he was acquired in a trade with the Boston Red Sox.
Russell Martin hit a three-run double in the eighth for Pittsburgh, which had won seven of eight. The Pirates' lead for the second NL wild card stayed at 1 1/2 games over Milwaukee, which lost 5-1 to Cincinnati.
Travis Snider hit a leadoff homer in the ninth against Cubs closer Hector Rondon, who then retired three in a row for his 24th save in 28 chances.
Arismendy Alcantara, another rookie prospect for Chicago, had two hits and two RBIs as the Cubs ended their worst losing streak of the season. Chicago also had lost seven straight games against Pittsburgh.
''It was a good team win,'' Cubs manager Rick Renteria said. ''A lot of people contributed.''
Pittsburgh's Jeff Locke (7-5) allowed three runs in 5 1-3 innings, throwing just 62 of 106 pitches for strikes. He lost for just the second time in his last seven decisions.
''I just didn't make pitches when I needed to in that (third) inning,'' Locke said. ''It was the difference in the game because we came back and scored late.''
Cubs: 1B Anthony Rizzo missed his 17th straight game with a lower back strain but remains on course to return to the lineup Monday night when Chicago hosts Cincinnati.
Pirates: LF Starling Marte sat out for the second game in a row with a bruised left arm and likely won't return to action until at least Tuesday for the opener of a three-game home series against Boston.
RHP Jacob Turner (5-9, 5.84 ERA) is scheduled to start for the Cubs on Sunday against RHP Edinson Volquez (11-7, 3.36 ERA) in the finale of the three-game series.
Turner is 1-2 with a 6.19 ERA in three starts since being acquired Aug. 8 in a trade with Miami. Volquez is 3-0 with a 2.29 ERA in his last nine starts and has not lost since July 21 to the Dodgers.
HE GOT THE BALL, EVENTUALLY
It seemed as if Szczur was in luck when a fan in the left-field bleachers threw his first home run ball back onto the field.
Snider retrieved the ball and tossed it to the ball girl along the left-field line, but she gave it to a boy sitting in the stands.
At the end of the inning, third base umpire Paul Schrieber gave the young fan another ball in exchange for the Szczur ball.