And then the strangest thing happened.

The Dodgers lost.

It’s true, it happened. There were witnesses and everything.

The Dodgers proved all too human Sunday, a pair of Hanley Ramirez errors in the ninth inning allowing the Phillies to score the winning run and salvage the finale of a three-game series with a 3-2 victory.

The loss snapped all kinds of Dodgers streaks: winning 10 straight, 12 consecutive victories in one-run games and 30 wins in a row when scoring first.

That’s how things had been going with the Dodgers for almost two months now. They constantly found different ways to pull out close victories, so even when the Phillies tied the score, 2-2, in the sixth inning, it was hard not to feel they would find a way to come back.

Manager Don Mattingly rested four regulars Sunday, including Adrian Gonzalez, starting Jerry Hairston Jr. at first base.

Hairston could not come up with a poor throw from Ramirez in the ninth inning, the ball apparently nipping the lip of the grass and coming up awkwardly on one hop. Hairston could not handle the hop and Ramirez was charged with error No. 1.

After Carlos Ruiz’s fourth single of the game advanced Casper Wells to third base, the Dodgers elected to intentionally walk Jimmy Rollins. With the infield playing up, pinch-hitter Michael Young hit a seeming double-play grounder to Ramirez, who fielded the ball and then dropped it for error No. 2 as Wells scored the winning run.

For a rare day, the Dodgers failed to make plays.

Both starters pitched well, though neither were involved in the final decision.

Ricky Nolasco went six innings for the Dodgers, giving up two runs on five hits and a walk while striking out five. Cole Hamels started for the Phillies and pitched seven innings, giving up a pair of runs on seven hits. He struck out eight and did not surrender a walk.

The Dodgers opened the scoring in the second inning, and in quick fashion when Andre Ethier led off with a solo home run. It was his ninth homer of the season, and third against a left-hander.

Ethier got it going again in the fourth inning with a one-out single. He took second on a Hamels wild pitch and scored on a Hairston hit. The Dodgers, though, could never add any runs.

The Phillies cut the lead in half in the bottom of the inning when rookie Darin Ruf hit a solo homer off Nolasco. It was his eighth of the season.

Philadelphia tied it in the sixth after Nolasco hit Chase Utley on the foot with one out. Domonic Brown singled to Yasiel Puig in right, and once again Puig tried to nail the runner from advancing to third base.

And once again the throw sailed too high for the cutoff man and arrived late at third. And yet again, the hitter happily ran to second base to put him in scoring position.

Nolasco walked Ruf to load the bases and then induced Cody Asche to bounce to second, but Asche was fast enough to beat the relay and avoid the double play as Utley scored. Nolasco got Wells to ground out to end the scoring, and his day.