After the Braves stranded two runners in a scoreless first inning Wednesday, beleaguered manager Fredi Gonzalez and Atlanta fans alike might have thought along the lines of Dorothy Parker, what fresh hell is this?

Ah, but things would turn out differently on this night. Mercifully so.

The Braves scored two runs in each of the next three innings and snapped a five-game losing streak with a 6-2 win against the Pirates at Turner Field. They won for just the fifth time in 21 September games, while the surging Pirates lost for only the fourth time in their past 19 games, after clinching a playoff berth with a 3-2 win Tuesday.

Julio Teheran (14-13) finally got some run support and snapped a four-start losing streak with a win in his final start of the season, allowing six hits, two runs and three walks with six strikeouts in five innings. He also had two hits and the game-winning RBI on a two-run, two-out single in the second inning.

“I felt a little excited and I just wanted to do my job today. Everything was working,” said Teheran, who will finish with a 2.89 ERA and 186 strikeouts in 221 innings, the seventh Braves pitcher since 2000 to have a sub-3.00 ERA in at least 30 starts and the first since Tim Hudson in 2010. “I was really focused on finishing strong tonight.”

Well-rested closer Craig Kimbrel was brought in to get the last two outs with two runners on, notching his 45th save by striking out Andrew McCutchen and Travis Snider. He was summoned after the Pirates used a one-out single off reliever Jordan Walden and a botched grounder by third baseman Phil Gosselin to put runners at first and second.

Justin Upton raised his RBI total to 99 with a two-run homer for the Braves, whose only two wins in their past 12 games have come against teams that clinched the previous night at Turner Field. They beat Washington and a lineup dotted with minor leaguers on Sept. 17, a day after the Nationals beat the Braves to win the National League East title.

The Pirates, still trying to win the NL Central title or at secure home field for the Wild Card Game, deployed their usual lineup Wednesday and got a two-run homer from McCutchen in the fifth inning. By then the Braves had already built a 6-0 lead, an extreme rarity for the home nine since the All-Star break.

For one night, at least, Gonzalez didn’t have to hear questions about his team looking flat or “checked out.”

“The game of baseball is running the bases, scoring runs, and anything short of that you start thinking you are lethargic, that there is no energy,” he said, repeating some of the descriptions that critics have had of his team in recent weeks. “Especially when you run two and three nights of low-scoring games. Today you come out and say, well, these guys look upbeat — and the only difference we have base runners, we have guys sliding everywhere and running the bases and scoring runs.”

After falling on their faces in September and being eliminated from the playoff race, the Braves had little to play for as a team, other than individual milestones — Upton needs two homers to have a 30-homer, 100-RBI season — and trying to avoid their first losing season since 2008.

They have a 77-81 record and must win Thursday’s series finale and sweep the season-ending weekend series at Philadelphia to finish with an 81-81 mark. Before Wednesday, the Braves were five games under .500 for the first time since May 9, 2010, when they were 13-18.

“Obviously this is a competitive team and we wanted to be in the playoffs, but that opportunity has come and gone,” Upton said. “Our goal is to play good baseball and win ballgames. Obviously guys have personal goals they want to get to, and that’s all going to come in a team effort. So we’ve all just got to continue to play good baseball in the next four games.”

They pushed across six runs in the second through fourth innings, matching their entire scoring output during the five-game skid before Wednesday. Six runs was twice as many as the Braves had scored in any of the previous 11 games.

They scored two apiece in three consecutive innings, after scoring just two runs while Teheran was in the game during his previous four starts combined. The Braves failed to score while he was in three of those outings, and Teheran was 0-4 despite a 2.67 ERA during his skid.

After Pirates left-hander Jeff Locke (7-6) intentionally walked B.J. Upton with first base open and two out in the third inning, Teheran’s bases-loaded single to center pushed the lead to 4-0 — the first time the Braves scored more than three runs since a 6-2 win at Washington on Sept. 10.

Teheran is the third Braves pitcher since 2000 to have at least three multi-hit games in a season, joining Tim Hudson (2007) and Kevin Millwood (2002), who each had four.

“I was trying to put the ball in play,” Teheran said. “I really wanted to get this win. I was trying to do my best hitting and pitching.”

An inning later, Upton extended the lead to 6-0 with his 28th homer. It was only the Braves’ second homer in 12 games and their seventh in September.

Upton was 9-for-67 (.134) with one homer and 25 strikeouts in 19 previous September games.

The Braves stranded two in the first inning when Jason Heyward struck out after a pair of two-out walks by Freeman and Upton. But Locke wouldn’t escape unscathed in the second, after Chris Johnson led off with a double and B.J. Upton drew a one-out walk. (Johnson would later leave the game with a low-back strain; he was listed as day-to-day.)

Teheran followed with a soft infield single that Ike Davis fielded between first base and the mound. After initially looking to the plate, Davis turned and flipped the ball to second baseman Clint Barmes covering first. Barmes tried to catch it with his bare hand and dropped the ball just as Teheran reached the base.

With the bases loaded, Emilio Bonifacio singled through the right side of the infield to drive in the first two runs.