The Phillies mustered the offense needed for a couple comebacks, and tantalizing eighth- and ninth-inning rallies, but not enough for the win Thursday night at Citizens Bank Park.

Carlos Beltran’s solo homer with one out in the eighth inning was too much to overcome and the Cardinals handed the Phillies their fourth straight defeat, 4-3.

Jimmy Rollins’ return to the lead-off spot paid dividends, as Phillies manager Charlie Manuel moved Ben Revere — and his .194 batting average and .242 on-base percentage — to seventh.

The Phillies tied it twice after falling behind 2-0 and 3-2, with Rollins doubling and scoring the Phillies’ first run.

But Beltran, lined a 2-1 pitch off Mike Adams into the left-field seats.

“He struck it well. I thought maybe it might be to the warning track or, hopefully, off the wall at best, but it stayed up and got out,” Adams said. “... I kind of left one up just enough where he could get a pass on it.”

The Phillies, who haven’t scored more than three runs in any of their last seven games, collected 13 hits, including nine against St. Louis starter Adam Wainwright (3-1).

“Tough to say we’re all the way there after a loss,” third baseman Michael Young said, “but two good pitchers going at it, so you know runs are going to be tough to come by. But we battled and I felt like our approach was a little better.”