PHILADELPHIA (AP)Edmundo Sosa homered for the second straight game and finished with three hits and three RBIs, and Bailey Falter earned his fourth straight win as a starter, lifting the Philadelphia Phillies to a 4-3 win over the Miami Marlins on Wednesday night.

Jean Segura also homered for the Phillies (75-61), who are in a virtual tie with San Diego (76-62) in the race for the second and third NL wild-card spots. Milwaukee is four games back. The Phillies hold a tiebreaker over the Brewers based on a 4-3 season series record, a factor in this first year without a regular-season tiebreaker game to determine playoff spots.

The Phillies haven’t made the playoffs since 2011, the longest drought in the National League and the second-longest in the MLB behind Seattle’s 21 seasons.

Jacob Stallings had two hits, including a solo homer in the ninth off reliever Connor Brogdon that pulled Miami within a run. Brogdon allowed the tying run on base before closing out his second save of the season.

Charles Leblanc and Garrett Cooper each had two hits for Miami, which has lost nine in a row for the first time since May 2013.

The 26-year-old Sosa, acquired in a July 30 trade with St. Louis for minor league reliever JoJo Romero to bolster Philadelphia’s infield depth- was 3 for 3. He knocked in two runs on a homer to left field in the third inning off Marlins starter Trevor Rogers. He added another RBI in the seventh on a ball that ricocheted off reliever Huascar Brazoban’s glove and into short right field for a double, scoring Matt Vierling with an insurance run.

”I feel very happy here,” Sosa said. ”Everyone has treated me well and welcomed me with open arms. I have no complaints. And it’s really motivates you to do well and help the team win.”

”It is nice to see him playing well and he’s shown some power the last couple nights as well,” Phillies interim manager Rob Thomson said.

The 25-year-old Falter, who spent most of the year bouncing between Philadelphia and Triple-A affiliate Lehigh Valley, has been a surprising addition to a starting rotation that has suffered since Zack Wheeler went on the injured list due to right forearm tendinitis.

”It’s been nice to develop a routine up here and I just want to keep it going,” Falter said.

Falter (4-3) allowed two earned runs in 5 1/3 innings while mixing a four-seam fastball and a heavy sinker and forcing weak contact from the Marlins. All seven of Miami’s hits off Falter were singles.

”I feel like that I was able to settle down after the first inning, making some good pitches and to come up with a W,” Falter said.

In his last four starts dating to Aug. 20, Falter has thrown 23 2/3 innings, allowed 19 hits, seven earned runs (2.66 ERA), walked two and struck out 18. Philadelphia is 4-0 in those starts and 5-7 in every other game in that stretch.

”He’s been a Godsend for us,” Thomson said. ”He’s been tremendous. I’m really proud of him.”

Segura added his ninth homer of the season with a solo shot in the fourth inning that curled just inside the foul pole in left field.

”There’s times when you’re going to have to tip your cap to hitters, and we know Segura’s a good hitter,” Marlins manager Don Mattingly said. ”But that ball there, to be able to keep it fair, that ball is so far down and in, to keep it fair – that’s really hard to do. So that’s just a good piece of hitting.”

Rogers (4-11) allowed just three earned runs in six innings, striking out eight and walking none.

”I think for him to finish strong would be really important for his offseason workouts, because then he’d be confident and he’s kind of back on track with what he’s working on and what he’s doing,” Mattingly said. ”During the winter is the time to be able to kind of set those habits in stone. So I think it’s really important for him.”

TRAINERS ROOM

Phillies: The progression of Siranthony Dominguez and Zach Eflin from their injuries continued with rehab assignments announced after Wednesday night’s game. Dominguez – who had become established as the club’s closer before being placed with right triceps tendinitis on Aug. 21- will head to Lehigh Valley on Thursday night for a rehab appearance out of the bullpen. Eflin, a starter who has been on the injured list since June 28 with a knee bruise in his surgically repaired right knee, will pitch for the IronPigs on Friday with a goal of returning to PHiladelphia’s bullpen during the pennant chase.

UP NEXT

The final game of the three-game series takes place on Thursday with Miami sending Cy Young contender Sandy Alcantara (12-7, 2.38) to the mound against Phillies RHP Kyle Gibson (9-6, 4.48).

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports