It wasn’t pretty but Braves starter Mike Foltynewicz left the mound having given his team a chance – an accomplishment that had eluded him in his previous three starts.

Unfortunately for him and the Braves, the offense didn’t provide much assistance.

Foltynewicz limited the Rockies to just a run over five innings, but the Braves couldn’t solve Rockies starter Jon Gray, dropping the contest 3-0 and losing the season series to Colorado, 4-3, at SunTrust Park on Sunday.

The Braves were shut out for the eighth time (second against Rockies) in 2017. Colorado had lost 23 of its last 30 road games before the weekend series in Atlanta.

It required 97 pitches for Foltynewicz to get through five frames, allowing four hits and three walks to go with six strikeouts. The Rockies touched him up for a career-worst eight runs three starts ago in Denver. Sunday, he scratched and clawed his way to his best start since a one-run, 11-strikeout outing against Miami on Aug. 5.

Foltynewicz retired the final seven hitters he faced in order.

“It felt good,” Foltynewicz said. “I kind of thought my pitches were in the zone I want to be. My slider was spinning alright today, curveball I was throwing for strikes. Threw a couple change-ups that kept them off-balance. ... Everything was working well.”

The Braves’ defense helped Foltynewicz as well. Freddie Freeman turned an unassisted double play in the first. Ender Inciarte ran 80 feet to track a ball in the depths of center field. Matt Adams made a play against the left field wall that Foltynewicz didn’t realize was caught.

Foltynewicz had allowed 20 earned runs over his last 11-2/3 innings (three starts) entering Sunday. He appeared to hit a wall after a stretch between May 12 and July 25 in which Foltynewicz went 9-1 with a 3.56 ERA (14 starts).

“He left with one run on the board,” Braves manager Brian Snitker said. “Command wasn’t real good, fought through it, never gave in, kept his wits about him. Could’ve been a lot worse. He made pitches when he had to and just avoided the big inning, which is good. ... Under the circumstances and what he battled, he did a good job.”

The Rockies (71-59) took advantage of Foltynewicz being lifted for pinch-hitter Lane Adams in the fifth. Adams struck out, and in relief of Foltynewicz, rookie A.J. Minter served up a two-run homer to Mark Reynolds to give Colorado a three-run cushion in the sixth.

“It (the homered fastball) kind of sneaked over to the middle more than I would’ve liked,” Minter said. “It’s a first-pitch fastball, trying to get ahead. It’s the big leagues. It’s not supposed to be easy.”

Gray, the Rockies’ default ace, was the opposite of Foltynewicz. He was efficient and effective most of the day, holding the Braves to five hits over six innings with seven strikeouts and two walks.

“That guy’s good,” Snitker said. “He’s just hard to get ahold of.”

The Braves (57-71) only had two runners advance to second against Gray: He hit Kurt Suzuki with a pitch after Brandon Phillips singled in the fourth inning; he gave up a single to Phillips and walked Freddie Freeman in the sixth, but Nick Markakis and Kurt Suzuki flew out to Charlie Blackmon.

Atlanta’s best scoring chance came in the seventh. Phillips led off with a single, chasing Gray from the game. Freeman walked, but Dansby Swanson flew out, and pinch-hitter Matt Kemp grounded into a double play.

It was Kemp’s 23rd time hitting into a double play, most in the majors despite two disabled list stints that have limited him to 95 of the Braves’ 128 games.

The Braves ran themselves into two outs on steal attempts by Freeman and Swanson. They ended the first and fifth innings, respectively.

Foltynewicz first encountered trouble in the second. After Gerardo Parra’s single and a walk to Carlos Gonzalez, Trevor Story split the gap for the second consecutive night to put Colorado up 1-0.

Braves pitching coach Chuck Hernandez immediately visited the mound. Foltynewicz responded by striking out Tony Wolters and Gray to leave two Rockies stranded.

A similar fate unfolded in the third when Foltynewicz walked Blackmon and DJ LeMahieu singled to start the frame. Foltynewicz forced Nolan Arenado to line out, struck out Parra, and after walking Reynolds, struck out Gonzalez.

“To his credit, he hung in there and kept fighting,” Snitker said of Foltynewicz. “Kept us in the game.

Entering Sunday, the Braves’ rotation had a 5.21 ERA since July 17, the day after the team reached .500 (45-45). It has allowed 53 homers in that span. Foltynewicz was the only starter to not allow a homer to the Rockies over the weekend (Julio Teheran, Sean Newcomb).

The latest loss completes a 3-6 homestand for the Braves. Atlanta hasn’t won a series since taking two of three from the Marlins Aug. 4-6, their lone home series win of the month.

The Braves travel to Philadelphia for three games and Chicago for four before returning to SunTrust Park to host the Rangers on Sept. 4.