PHILADELPHIA (AP) -- Pinch-hitter Odubel Herrera's RBI single with two outs in the 10th inning lifted the Philadelphia Phillies to a 5-4 victory over the Tampa Bay Rays 5-4 on Wednesday.

Adam Morgan of the Philadelphia Phillies slides safely into second base at Citizens Bank Park in Philadelphia. (Hunter Martin, Getty Images)

The Phillies lost a franchise-record 62 games before the All-Star break, but are 5-1 since returning. They swept a three-game set against Miami and took two of three from the Rays to win consecutive series for the first time since last September.

Domonic Brown led off the 10th with a single off Brad Boxberger (4-6) and advanced on a sacrifice. After a bouncer to the mound for the second out, Herrera lined the 11th pitch he saw to left-center to drive in Brown.

Herrera was mobbed by teammates after rounding first and was taken down to the ground by Jonathan Papelbon as players piled on.

Papelbon (2-1) pitched two scoreless innings for the win.

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)