Four years after legendary Yankees closer Mariano Rivera said Manny Banuelos was the best pitching prospect he’d seen, Banuelos looked almost worthy of such praise through five-plus innings of his major league debut Thursday for the Braves.

High humidity did what Washington Nationals hitters couldn’t do to Banuelos, abruptly ending the left-hander’s night due to cramping in the sixth inning, but the Braves made the night a huge success anyway, beating ace Max Scherzer when Cameron Maybin hit a one-out single in the ninth for a 2-1 walkoff win in a series finale at Turner Field.

Pedro Ciriaco led off the ninth with a pinch-hit infield single, advanced on Jace Peterson’s sacrifice, and scored when Maybin hit a ball that sailed over third base to the left-field corner, easily scoring Ciriaco.

It brought the Braves racing from the dugout to celebrate and gave the Braves a series win against the Nationals, who had beaten Atlanta nine games in a row before the past two nights. For Maybin, it was redemption after a tough play that he felt he should’ve made on a seventh-inning Bryce Harper leadoff double that led to the Nationals’ tying run.

“I got a good jump on the ball and felt like I should have caught it,” he said. “At the time, it’s one of those things where you’ve got to keep going. I’ve been pretty comfortable in that situation all year, so you just try to stay relaxed, just battle against a guy like that.”

Maybin ranks among NL leaders with a .391 average with runners in scoring position, with Thursday’s hit another in a series of big ones he’s had in late innings.

“Sometimes the baseball god will smile down on you, and they did for me,” he said. “Pedro did a great job; he’s been doing an awesome job all year coming up with big hits to drive guys in or get a guy on when we need it. So he’s been awesome, and Jace has been doing a good job staying in the game, continuing to battle, getting a guy over. Those little things were a big key. The team did a great job of picking me up after that play.”

Banuelos, who had seven strikeouts and allowed only two hits in 5 2/3 scoreless innings, was removed due to dehydration and cramping in his left calf and fingertips of both hands, after hitting consecutive batters — Denard Span and Danny Espinosa – with pitches.

“I drank a lot of fluids yesterday and today, because (the same thing) happened to me a couple of weeks ago when I was at Gwinnett,” Banuelos said. “I don’t want that (to force him from the game). I tried to finish the inning, but I started feeling bad, and it got worse and worse.”

Reliever Nick Masset got the Braves out of the sixth with a 1-0 lead intact, but David Aardsma gave up the tying run in the seventh after Bryce Harper led off with a double that squirted from the glove of center fielder Maybin on a sliding catch attempt. Wilson Ramos followed by poking an RBI single through the right side of the infield.

Jason Grilli (4-3) pitched a perfect ninth for the win, which gave the Braves just their second series win in their past 14. The third-place Braves are five games behind the Nationals in the NL East.

“They’re playing well, and in order to get to our goal we’ve got to take some games away from them, so that was a pretty important win today,” said Braves shortstop Andrelton Simmons, whose RBI single in the fifth inning scored Juan Uribe for a 1-0 lead.

Scherzer (9-6) had been 7-2 with a 1.60 ERA in his past nine starts before Thursday, highlighted by his remarkable June 14-20 stretch in which he threw back-to-back shutouts with one hit, one walk and 26 strikeouts in 18 innings – a one-hitter with 16 strikeouts vs. the Brewers, and a no-hitter at Pittsburgh.

He retired 12 of the first 13 Braves batters before Uribe’s leadoff double in the fifth.

Simmons was caught stealing for the second out of the inning, and the Braves didn’t have another runner reach base against Scherzer, who struck out the side in the sixth and retired the Braves in order in the sixth, seventh and eighth.

Banuelos threw 48 strikes in 75 pitches, issued no walks, and retired 13 consecutive batters after Ramos’ leadoff single in the second inning. He induced a double-play grounder from the next batter, former Brave Dan Uggla, and the Nationals didn’t have another base runner until Span was hit by a pitch in the sixth.

When Espinosa was hit two pitches later, Banuelos motioned to catcher A.J. Pierzynski, who signaled to the bench that Banuelos needed to be checked. Braves manager Fredi Gonzalez, pitching coach Roger McDowell and trainer Jim Lovell came out to see what was wrong. After a brief conversation, Banuelos walked to the dugout, receiving a standing ovation.

“What a shame for him to come out of the game because of that,” said Gonzalez, who praised Banuelos’ calm demeanor and steady performance in a matchup that could’ve overwhelmed some rookies. “Not (fazed) at all. We saw it a little bit in spring training, but today for his major-league debut against Scherzer, I was really impressed. He even handled the bat.”

In 2011, when Rivera was asked if Banuelos was the best pitching prospect he’d seen, he said he thought so. Rivera said that he liked everything about him but particularly his composure.

Once a consensus top-30 prospect, Banuelos’ career was slowed by injuries including a torn elbow ligament that required Tommy John surgery and caused him to miss the entire 2013 season.

“I’ve been waiting for this moment for years and years,” Banuelos said. “I got an injury and all that, but thank God I made it.”

No longer rated among baseball’s top 100 prospects, Banuelos was traded in January to the Braves in exchange for relievers David Carpenter and lefty Chasen Shreve. The Braves had hired away international super scout Gordon Blakeley from the Yankees in the fall, and Blakeley strongly recommended Banuelos, still only 24, as a trade target for the Braves.

Banuelos was 6-2 with a 2.29 ERA and .215 opponents’ average in 15 starts at Triple-A Gwinnett, with 69 strikeouts, 38 walks and two homers allowed in 82 2/3 innings. He was brought up to fill the rotation spot of Perez, who is on the 15-day disabled list with a bruised foot. Manager Fredi Gonzalez said prior to Thursday’s game the Braves could move either Banuelos or Perez to the bullpen when Perez comes off the DL.

Banuelos was dominant in a two-hit shutout June 22 against Indianapolis, with five strikeouts and no walks in a season-high 101 pitches. That was the 10th start of a run in which he posted a 1.21 ERA with 50 strikeouts, 24 walks and only one homer allowed in 59 1/3 innings. That surge stalled Saturday at Pawtucket when he allowed four hits, three runs and four walks in three innings, his briefest start of the season.

But on the big stage for the first time, against first-place Washington and the National League’s freshly minted June Pitcher of the Month, Banuelos was extremely impressive, until his body balked on a warm and humid Georgia night.