AP photo by John Bazemore / Chicago Cubs starter Adbert Alzolay pitches during Thursday's game against the host Atlanta Braves.

ATLANTA — A breakout game by the Chicago Cubs' hitters provided the perfect setting for Adbert Alzolay's longest start of his young MLB career.

Jason Heyward drove in two runs with two hits as the Cubs emerged from their slump to beat the Atlanta Braves 9-3 on Thursday night, ending a five-game losing streak.

The Cubs had 16 hits, topping their combined total of 13 in the first three games of the series. Jake Marisnick hit a homer in the seventh, and every Chicago starter had at least one hit.

Alzolay (1-2) allowed two runs on four hits and had six strikeouts in six innings. It was the longest of 10 career starts for the right-hander.

"We haven't been as good as everyone expected as starting pitchers, but tonight I felt it was good for the team that I went out there and I gave the team six innings," Alzolay said.

Cubs manager David Ross said the big night from his hitters made it easier to trust Alzolay for the sixth inning.

"It was nice, especially letting him work through that last inning, when you have some run support and some cushion there," Ross said.

Matt Duffy, hitting third, reached base four times on two hits and two walks. He scored two runs and drove in a run.

"I honestly just feel like I've got to find a way to get on base," Duffy said. "If I can do that often with those guys around me, I feel like good things are going to happen."

After 5-0 and 10-0 losses the previous two nights, Chicago found its offense and avoided a four-game sweep. The Cubs ended a streak of 20 consecutive scoreless innings with two runs in the first.

Kris Bryant had a run-scoring single in the opening inning, and Duffy, who singled, scored from third on a balk by Bryse Wilson (1-2). Anthony Rizzo had three hits.

Wilson, pitching on three days rest, gave up four runs on seven hits and two walks in three innings.

The Braves were denied their attempt to move over .500 for the first time this season, stuck at 12-13.

Alzolay's second-inning single to right field was his first career hit. While standing on first base, he motioned to the Chicago dugout to make sure the milestone baseball was saved.

"It was a special moment for me," he said. "At this point I don't know how I hit the ball, but I'll take it."

Atlanta's Marcell Ozuna led off the sixth by lining a homer 479 feet over the Cubs' bullpen behind the left-field wall.

The Braves' Ronald Acuña Jr. drove in a run with a seventh-inning single off Ryan Tepera. With left-hander Andrew Chafin on the mound, Freddie Freeman hit into a double play to end the inning.

Austin Riley drove in the Braves' first run with a fourth-inning single. He had two hits to raise his batting average to .301. He is hitting .483 (14-for-29) in his past 10 games.

On the injury front, Atlanta left-hander Max Fried (right hamstring strain) threw to hitters before batting practice. Fried showed no sign of the injury while throwing from the mound, fielding bunts and covering first base. He could come off the injured list early next week.

Braves manager Brian Snitker was encouraged, saying Fried "was really good. I thought his stuff was real crisp, command was real good."