PHILADELPHIA (AP) -- Darin Ruf hit a walkoff single with one out in the ninth inning after Maikel Franco tied it in the eighth with a two-run homer to lead the Philadelphia Phillies to a rare late-inning comeback victory, 5-4 over the Cincinnati Reds on Tuesday night.

Darin Ruf of the Philadelphia Phillies celebrates with his teammates at Citizens Bank Park in Philadelphia. (Drew Hallowell, Getty Images)

Odubel Herrera led off the ninth against Tony Cingrani (0-2) with an opposite-field double to left. Herrera went to third on Carlos Ruiz's sacrifice bunt and scored on Ruf's single to right.

Jonathan Papelbon (1-0) pitched a 1-2-3 ninth, striking out two, to earn the victory.

The Phillies looked headed to their eighth straight loss before scoring two runs with two outs in the eighth.

Philadelphia improved to 2-30 when trailing after seven innings.

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