Click photo to enlarge
Miami Marlins' Henderson Alvarez delivers a pitch during the first inning of a baseball game against the Philadelphia Phillies, Tuesday, July 1, 2014, in Miami. (AP Photo/Wilfredo Lee)

MIAMI (AP) — Ed Lucas' single scored the winning run from second base with one out in the 11th inning Tuesday night and the Miami Marlins broke a four-game losing streak by beating the Philadelphia Phillies 5-4.

The Phils lost their fifth game in a row.

The Marlins won their ninth consecutive game when Henderson Alvarez starts, matching the longest such streak with a pitcher in franchise history. Alvarez allowed two runs in seven innings.

Pinch hitter Jeff Baker singled to start the 11th inning against Justin De Fratus (2-1), advanced on a sacrifice and scored without a play on Lucas' opposite-field hit.

The Phillies overcame a 4-2 deficit in the eighth with back-to-back two-out homers by Marlon Byrd and Cody Asche off Kevin Gregg. Byrd clanked his 16th homer off the home-run sculpture, and two pitches later Asche pulled his fifth homer just inside the foul pole.

After the homers, Miami's bullpen retired the final 10 Phillies batters. Bryan Morris (6-0) pitched two innings.

The Marlins' Giancarlo Stanton singled home a run to increase his RBI total to 61, which leads the NL. Casey McGehee singled and scored and has reached base in 25 consecutive games.

Miami also scored on a strikeout against A.J. Burnett, who struck out 10 but allowed four runs, three earned, in six innings.

Alvarez was better, and even when he was on his backside, the Phillies had trouble reaching base. When Burnett broke his bat on a dribbler, Alvarez leaped to avoid the barrel and then crumpled in a heap on the mound. He watched from a supine position as third baseman McGehee threw Burnett out.

Alvarez again fell fielding Cameron Rupp's one-hopper in the seventh, and while sitting on the mound tossed to first for the out.

The Marlins' Steve Cishek also had a highlight-reel moment, reaching behind his back to snare another one-hopper by Rupp for an out in the ninth.

The Marlins loaded the bases in the fourth with the help of two walks, and Jarrod Saltalamacchia hit a broken-bat two-run single to make it 2-all. He had been 2 for 18 previously against Burnett with 11 strikeouts.

Christian Yelich led off the fifth with a single, stole second and scored on Stanton's single. Stanton scored from third with two out when Marcell Ozuna struck out on a wild pitch and reached first without a play.

The Phillies began the game in an 0-for-20 slump with runners in scoring position, but ended the drought in the first inning when Jimmy Rollins doubled and Chase Utley singled him home.

NOTES: Phillies LHP Cliff Lee (elbow) threw 60 pitches in three innings in a simulated game Tuesday and said he felt good. He's expected to make one or two rehabilitation starts before rejoining the rotation, likely after the All-Star break. ... Phils C Carlos Ruiz (concussion) has yet to show much improvement. ... Three-time All-Star Grady Sizemore, who signed a minor league deal last week, might join the Phillies during their trip, manager Ryne Sandberg said. ... Marlins RHP A.J. Ramos (shoulder) hasn't pitched since Thursday and is likely headed for the disabled list, manager Mike Redmond said. ... Marlins fan Jonathan Esponda, 8, whose gyrations in the stands became an Internet video sensation, threw out the first pitch and then danced with team mascot Billy the Marlin. ... LHP Cole Hamels (2-4, 2.84) is scheduled to start Wednesday for the Phillies against RHP Tom Koehler (5-6, 3.70).