You can take Derek Jeter and Alex Rodriguez out of the Yankees’ lineup. Mark Teixeira and Curtis Granderson, too.

And still, Andy Pettitte is the Red Sox’ kryptonite.

It was only the third game of the season, much too soon to qualify as a must-win, even for the most overindulged New Yorkers. But Red Sox catcher David Ross, a nearly lifelong National Leaguer, could tell the broken-down Yankees were a little desperate last night after being humbled in the previous two games.

So, they handed the ball to Pettitte, the 40-year-old lefty who has started some of their biggest games in the past two decades, and as usual, he didn’t let them down. Pettitte tossed eight superb innings, sending the Red Sox to a 4-2 loss, their first of the season.

“You’ve got a guy up there on the mound who’s used to pitching what, for them, I’m sure was a humongous game,” Ross said after the Sox fell short of their first season-opening sweep since 1999. “Wanting to get a win in this opening series at home, you could tell (Pettitte) was fired up. He got a couple double plays — you could tell how much it meant to him.”

It wasn’t like the Red Sox didn’t have their chances.

In the first inning, overaggressive Shane Victorino was tagged out at the plate when he tried to score from second on a wild pitch. In the seventh, Ross was sure he had hit a game-tying two-run homer, but Brett Gardner tracked the ball and hauled it in on the warning track in left-center.

And after scoring one run in the ninth against indomitable closer Mariano Rivera, the Red Sox brought the tying run to the plate only to see Jackie Bradley Jr. strike out on three pitches, surely a welcome-to-the-majors moment for the 22-year-old phenom.

“Too close to take,” Bradley said of the final pitch, a signature Rivera cutter.

In between, Pettitte cruised en route to his 19th career victory in 38 starts against the Sox. He also improved to 18-3 in 27 career starts with the Yankees attempting to avoid a regular-season sweep.