By Sam Bush

Tony Gwynn Jr. led off the ninth with a walk against Miami closer Steve Cishek and later scored, Ben Revere added the go-ahead run when Miami second baseman Donovan Solano bobbled a potential double-play grounder and the Phillies rallied past the Marlins 5-4 Thursday night to snap a six-game losing streak.

“We basically took what they gave us,” Phillies manager Ryne Sandberg said. “As they gave us bases our guys were alert and had the speed on the bases to get into scoring position and then it was just balls in play and avoiding strikeouts and making something happen.”

Revere had two hits for the Phillies, who won for the third time in 13 games. It was Revere’s sixth multi-hit game in his last eight outings.

Phillies closer Jonathan Papelbon got his 19th save in 21 chances. Jake Diekman (3-2) got the win despite a shaky eighth, giving up two runs and costing Philadelphia the lead.

“Good thing is we didn’t get swept, we were able to get a win,” Gwynn said. “Hopefully it will propel us into some more. Getting swept is a bad feeling and then having to get on a plane after that is even worse.”

Cameron Rupp had a two-run, two-out, full-count double off Miami reliever Chris Hatcher to highlight Philadelphia’s three-run sixth. Rupp was batting .125 before his opposite-field hit sailed over Giancarlo Stanton’s head and off the right-field wall.

Phillies starter Kyle Kendrick gave up six hits and struck out four in seven innings, leaving with a 3-2 lead. Marlins starter Brad Hand gave up three singles to open the sixth and was chased after 99 pitches, the fourth-most of his career.