The Phillies arrived for their first homestand of the season a week ago as a team down in the dumps with a manager already in the doghouse. Having lost four of their first five games to the Atlanta Braves and New York Mets on the road, a fast recovery was needed or the Phillies risked a spring of listening to home crowds spelling out the name of their favorite football team just to ease the misery.

A favorable schedule that included dates with the Miami Marlins and Cincinnati Reds, possibly the two worst teams in baseball, made that possible. To their credit, the Phillies took that opportunity and won with it. They put the finishing touches on a 5-1 homestand Wednesday night by beating the Cincinnati Reds, 4-3 in 12 innings at Citizens Bank Park.

"It feels good," manager Gabe Kapler said. "I'm just really glad for our players. They're doing their jobs. They're coming up in big situations and getting their hits and grinding through long games. Happy for them."

Rookie Scott Kingery continued the fantastic start to his career by driving a 3-1 pitch from reliever Austin Brice to right field for a walk-off sacrifice fly in the bottom of the 12th. In the three-game sweep of the Reds, the rookie played three different positions, hit his first major-league home run, his first grand slam and got his first walk-off hit.

"It has been three (straight) days that have been pretty cool," Kingery said. "They brought that fifth infielder in and they were looking for a double play right there," Kingery said. "They had a sinker pitcher in there and the first three pitches were down. I was just looking for something up, something I could at least just get deep enough in the outfield in the air."

Pedro Florimon started the 12th with a routine grounder to second base, but Scooter Gennett sailed the throw over first baseman Joey Votto's head. The throwing error allowed Florimon to take second base and J.P. Crawford followed with a sacrifice bunt. After Cesar Hernandez was intentionally walked, Kingery came through with his fly ball to deep right field that scored Florimon.

Long before that, it appeared as if it was going to be a neat and speedy victory for the Phillies fueled by a fine pitching performance from righthander Nick Pivetta. Instead, it turned into a marathon when the Reds ended closer Hector Neris' stretch of 21 straight saves by scoring in the top of the ninth inning.

With the Phillies ahead 3-2, Neris surrendered a leadoff double to Scooter Gennett that nearly cleared the fence in left field. After a brief umpire review confirmed the ball did not leave the park, catcher Devin Mesoraco singled to right field and Phillip Ervin tied the score with a single to center field.

To his credit, Neris escaped the inning with the game still tied by retiring Cliff Pennington and Billy Hamilton on strikeouts after a sacrifice bunt resulted in the first out of the inning. But now the Phillies were in a marathon in a season filled with games that have lasted well over three hours.

The Phillies were on the verge of falling behind in the top of the 10th when Gennett launched another shot deep to center field that had the distance to be a two-run home run into the shrubbery. Odubel Herrera, however, got back to the wall and made the catch, keeping the score tied at 3-3.

Long before the bonus baseball, the Phillies had built a 3-2 lead behind upper-deck home runs from the duo of Crawford and Hernandez. Crawford, one night after breaking out of a 0-for-18 slump with a game-winning single, blasted his first career home run into the second deck in right field off Cincinnati's Luis Garcia to give the Phillies a 2-0 lead in the second inning.

Hernandez, one of only two Phillies that has started every game, hit another second-deck home run off Castillo that gave the Phillies a 3-2 lead with two outs in the bottom of the fifth inning.

Pivetta made that lead stand up through seven innings as he continued his early-season success by allowing just five hits and two fourth-inning runs to lower his earned run average to 2.70 after three starts. Pivetta struck out seven and did not walk a batter for the second straight game. He has 19 strikeouts and just two walks in 16 2/3 innings. A year ago, he walked 57 batters in 133 innings and threw 11 wild pitches, so he has clearly improved his command so far this season.

"I think (Pivetta's) concentration level is different than it has been in the past," Kapler said. "And I think the intensity level is different than it has been in the past. And he has been able to maintain it throughout longer stretches. He worked diligently in spring training to attack with fastballs up in the zone and to use his curveball to play off that."

Kapler rewarded Pivetta by sticking with him into the seventh inning even though the 25-year-old righthander had thrown 92 pitches through six innings. Pivetta responded with a perfect seventh and Adam Morgan got through a scoreless eighth before Neris was charged with his first blown save since June 21 of last season.

Pivetta needed some defensive help and it came from Kingery in the sixth inning. After Jose Peraza singled to center field and stole second base, Joey Votto dropped a single into left field. Kingery, making the first start of his career in left field, scooped the ball up quickly and threw a one-hop strike to home plate, allowing catcher Jorge Alfaro to make the tag on Peraza, who tried to cross the plate standing.

Pivetta retired the final five hitters he faced and a few hours later the Phillies had finished their first homestand with a 5-1 record to move a game above .500 after arriving home with a 1-4 record one week ago.

Now, following an off day Thursday, they go back on the road for a six-game trip that begins Friday night against a rebuilding Tampa Bay Rays squad that is off to a 3-9 start. The road trip ends in Atlanta, the place the Phillies' season got off to an inauspicious start. For now, the sting of those early losses down in Atlanta has worn off, thanks to a lovely week at home.

Get insights on the Phillies delivered straight to your inbox with Extra Innings, our newsletter for Phillies fans by Matt Breen and Bob Brookover. Click here to sign up.