It had been over two years since the Braves held a non-losing record beyond the first dozen games of a season. On Sunday they ended that stretch in convincing fashion while pitcher Jaime Garcia ended his own recent skid.

Brandon Phillips had three doubles, the Matts — Kemp and Adams — hit home runs in a four-run fourth inning and Garcia pitched seven strong innings in a 7-1 win against the Arizona Diamondbacks at SunTrust Park. The Braves got back to .500 (45-45) and completed a sweep of a team with the fourth-best record in the majors.

“It was fun,” said Matt Kemp, whose three-run homer in the third inning gave the Braves a 5-0 lead. “That’s a good team we swept. We’ve just got to keep going. We’ve got another tough series coming up tomorrow. It’s time to enjoy this tonight and turn the page tomorrow and get ready for the Cubs.”

The Braves have won 16 of their past 24 games and reached .500 for the first time since their 6-6 start this season. It’s also the first time they’ve been there later than April since they were 42-42 on July 7, 2015.

With the defending World Series champion Cubs arriving for a three-game series, the Braves will try to get above .500 for the first time since June 1, 2015, when they were 26-25. They were last above .500 after the All-Star break on Sept. 14, 2014, when they had a 75-74 record.

“Can’t say enough about what they did the last three days,” Braves manager Brian Snitker said. “A lot of good things happening. Guys are playing with a lot of energy, a lot of confidence. It’s a big start by Jaime. That was a shot in the arm, him covering those innings and doing what he did.”

While a .500 record represents significant progress, Kemp and Freddie Freeman said the Braves were aiming higher.

“That’s a step in the right direction,” Kemp said. “Still got a long way to go. Just got to keep it going, keep playing good baseball, one game at a time.”

The Braves plan to activate versatile veterans Sean Rodriguez and Danny Santana from the disabled list before Monday’s series opener against the Cubs, who beat the Orioles 8-0 on Sunday to complete a three-game sweep of their own.

“We’ve got some reinforcements coming at the right time,” Freeman said. “So getting back to .500 is huge and hopefully we can start getting closer to the wild card. One step at a time. We saw what the Cubs just did at Baltimore. We’ve got our hands full.”

Kemp added, “Especially playing the defending champs coming in here, we have to bring it. They’ve got a good squad over there, too. There’s going to be some good baseball in the next month. I think this month is going to decide our, you know, us going for it and where we stand.”

Garcia (3-7) snapped a seven-start winless streak, allowing just four hits, one run and three walks with seven strikeouts in seven innings. He had been 0-4 with a 6.87 ERA since the beginning of June and had a 9.41 ERA over his past four starts.

“It was nice to get the W, but even better for the team to get a win,” Garcia said. “We were able to win three against a really good team. Everybody’s playing really well right now. Just got to continue to get ready for the next one.”

The left-hander likely boosted his trade value when he didn’t give up a hit until the fourth inning and didn’t allow any extra-base hits. Garcia is in the final year of his contract and was expected to be dealt before the July 31 non-waiver trade deadline, though his recent woes seemed to cool trade rumors.

The Braves recorded their fifth series sweep and second consecutive three-game sweep, including June 30-July 2 at Oakland. Arizona has a season-high five-game losing streak.

“(The Braves) have been playing real good baseball,” said Freeman, who has been back for nine games after missing seven weeks for a fractured wrist. “I’m just happy to fit right back in and get going.”

The Braves took a 1-0 lead in the first inning when Ender Inciarte led off with a single and Phillips drove him in with the first of his doubles, the first three-double day of the Redan High School graduate’s 16-year career.

They added another run in the second inning after Adams reached base on a wild-pitch third strike and Dansby Swanson hit an infield single that ended with an errant throw and Adams scoring from second base.

The slim margin grew quickly in the fourth inning with the homer from Kemp and a solo shot two batters later from Adams. Phillips started the inning with a double and added another RBI double in the fourth.

The two-homer third inning was the first for the Braves since June 22, when Phillips and Lane Adams homered in the eight-run fifth inning of a 12-11 win against the Giants at SunTrust Park.

Kemp’s three-run homer was his 13th of the season and first in 16 games since June 21 against San Francisco. He hit .197 (12-for-61) with one extra-base hit and a .471 OPS in his past 16 games before Sunday.

“Yeah, guys been giving me a hard time about not hitting the ball out of the ballpark,” he said, smiling. “So it felt good to get that one and put the squad up.”

Adams’ 15th home run gave him two in his past four games after an 11-game drought. It was his 14th homer for the Braves in 46 games since being acquired from St. Louis.

After driving in just one run during an 11-game stretch from June 23 through July 7, Adams has six RBIs in his past four games on a pair of three-run homers.

Diamondbacks starter Zack Godley (3-4) was charged with eight hits, seven runs (six earned) and one walk with a career-high nine strikeouts. Before Sunday, he hadn’t allowed more than three runs or one homer in a game this season.

Phillips also had three hits including a double and a home run in Saturday’s 8-5 win. Seven of his eight home runs in his first season with the Braves have come at SunTrust Park, where Phillips, who grew up in Stone Mountain, usually has an entourage of family and friends in attendance for most games.

Garcia didn’t give up a hit until David Peralta’s slow-rolling infield single to start the fourth inning. Peralta went to second on Garcia’s throwing error on the play and scored when Paul Goldschmidt followed with a single through the right side.