Three-and-a-half weeks. That’s how long it had been since the Braves won consecutive games.

They ended the drought with a 7-5 victory against the Philadelphia Phillies on Wednesday night at Turner Field. Rookie pitcher Mike Foltynewicz did his part with his arm and bat before the Braves withstood some shaky relief and came away with a series win.

Atlanta’s hottest hitters stayed that way: Andrelton Simmons had three hits including a homer, and Freddie Freeman went 3-for-4 with two doubles and three RBIs as the Braves won for the fourth time in six games and climbed back to .500 (14-14) with their first back-to-back wins since a 5-0 start.

“I didn’t notice,” Braves manager Fredi Gonzalez said. “But we won the series, I knew that. That’s a good roll to get on and it’s nice to get a win before an off day. Go to Washington for a big series against them. Hopefully we continue to swing the bat like we have been and our pitching gets a little better, especially that middle relief.”

It was their first series since since taking two of three games at Toronto April 17-19.

Jason Grilli recorded his ninth save in 10 chances, but not before giving up a run on two hits and a walk in the ninth inning. He gave up a leadoff hit and two-out walk to Ryan Howard before Darin Ruf singled in a run. With the potential tying run on base, Grilli struck out Odubel Herrera to end the game.

“We hadn’t won a series in a few,” said Freeman, who is 20-for-43 (.465) with nine extra-base hits in his past 11 games. “Ending the homestand like this was definitely a nice way to go. Going to Washington, you wanted to feel good with a couple of wins back to back. And we did that today.”

The Braves start a nine-game trip Friday with the opener of a three-game series at Nationals Park.

After losing three consecutive three-game series at New York and Philadelphia and at home against the Nationals, the Braves split a four-game series against the Reds. The 2-1 series win against the last-place Phillies (10-19) closed a 5-5 homestand.

Foltynewicz (2-0) got his second win in as many major league starts and had a sacrifice fly to give him three RBIs in two games. He got solid run support to offset a lack of assistance from a bullpen that was leaky after a night off Tuesday when Shelby Miller tossed a shutout.

Foltynewicz was charged with seven hits, four runs and three walks with seven strikeouts in 5 1/3 innings, and the rookie right-hander helped his cause again with the bat, hitting a sacrifice fly to right field in the fifth to drive in the first run of a four-run inning that stretched the Braves’ lead to 6-1.

The Braves jumped out to a 1-0 lead in the first inning on Simmons’ second homer of the season, and moved back in front 2-1 in the fourth when Simmons hit a leadoff double a foot in front of the left-center wall and scored on Freeman’s double.

“It was good to get on the board first,” said Simmons, who is 10-for-21 with three doubles and two homers during a six-game hitting streak that’s raised his average to .292. “I’ve been feeling pretty decent at the plate, putting a good amount of work in the cage, and it paid off today.”

Gonzalez said this early part of the season has featured Simmons keeping the same sound approach at the plate for the longest period that the manager could remember. Simmons was asked about that and whether he agreed.

“I don’t want to say that, because whenever you say that, that’s when things go south,” Simmons said, smiling. “But I’ve been feeling pretty good, and I’m just trying to keep that same feeling every day.”

He said it helped batting second between Nick Markakis, who had two hits including a double and two RBIs, and Freeman.

“You’ve got guys who are always on base or always drive you in,” Simmons said, “so you’re always scoring runs or you have a chance to drive a guy in. It’s always nice hitting behind Nick, and when I get on base I’m ready to run when Fredi’s up.”

In his Braves debut Friday against the Cincinnati Reds, Foltynewicz allowed six hits and three runs (two earned) in five innings, and lined a two-run double in his second major league at-bat. A former high school batting champion, the rangy 23-year-old never batted in the minor leagues or in 16 relief appearances late last season with the Astros in his first big-league stint.

His RBI in the fifth came after consecutive singles from Jace Peterson and Cameron Maybin to start the inning. Nick Markakis and Simmons followed Foltynewicz with another pair of singles off starter Jerome Williams, and the Phillies decided against having the right-hander face Freeman a third time with two on and one out.

So they brought in hard-throwing lefty Jake Diekman, whom Freeman greeted by lining a two-run double down the right-field line, pushing the lead to 6-1.

Williams (2-2) lasted 4 1/3 innings and was charged with eight hits and six runs, easily his worst start of the season.

Ben Revere had a four hits including career-high three doubles for the Phillies, including a two-out number off left-hander Luis Avilan in the sixth that drove in the third run of the inning and cut the Braves’ lead to 6-4.

Braves nemesis Howard led off the inning with a homer, the veteran slugger’s fifth of the season, three of which have come in his past four games against the Braves.

Foltynewicz shouldn’t feel too bad about it, considering Howard has a .288 average and career-highs of 50 homers and 140 RBIs in 161 games against the Braves, including 21 homers and 75 RBIs in 79 games at Turner Field.

One out later, the Phillies used an infield single and a walk to chase Foltynewicz from the game after 101 pitches, including 76 strikes. Reliever Cody Martin got Cameron Rupp to pop up for the second out, but former Brave Jeff Francoeur’s two-out pinch-hit single drove in the second run of the inning.

“It was a lot better out there,” Foltynewicz said of the comfort level in his second start. “There was some innings where I flew by and got some quick outs and there were some other innings where I battled my butt off and got outs. I thought it was an overall good outing. In the sixth, I think I just got run down with a long inning and put my bullpen in a crappy situation. Other than that it was a good team ‘W’ and a good series win.”

After Francoeur’s hit, Avilan was brought in to face Revere, another thorn in the Braves’ side. He doubled for the third time in a four-inning span, driving in another run charged to Foltynewicz. Revere added a ninth-inning single to raise his career average to .345 in 119 at-bats against the Braves and

Foltynewicz left the game with a 6-2 lead and two on with one out, and both runners scored on hits against relievers.