MLB

Rivera, Yankees beaten by Athletics in 18-inning heartbreaker

OAKLAND — It took the Yankees playing the equivalent of two games to lose one Thursday. Watching them fail to hit, they could have been at it for two days and not scored.

Following a heartbreaking 3-2 loss to the A’s in 18 innings before 27,569 at the Coliseum, the weary Yankees attempted to put the defeat that took 5 hours and 35 minutes to complete and a three-game sweep by the AL West leaders in the trash bin.

Yet the reason for the defeat was impossible to ignore: In 18 frames, the Yankees scored two runs in the first and nothing in the following 17. With runners in scoring position, they went 1-for-13 for the game and 0-for-9 from the 10th to the 14th inning and didn’t get a runner on base from the 15th to the 18th.

And the most glaring statistic: Mark Teixeira, Travis Hafner, Kevin Youkilis and Vernon Wells — the four-seven hitters — went a combined 0-for-28.

“We have to be better than that,’’ said Teixeira, who went 0-for-5 with two walks and three strikeouts. “That’s a no-hitter for all of us. That’s no good.’’

The lack of hitting, especially from the 15th on, was almost as hard to watch as the missed chances in the extra innings.

They left the bases loaded in the 11th and 14th, and the overall miserable hitting wasted a wonderful pitching performance by reliever Adam Warren, who worked six scoreless innings and likely will be sent to the minors today because he is of no use to the Yankees for at least four days.

“It’s a little frustrating, but it doesn’t change the result,’’ Joe Girardi said of the dead bats. “The bottom line is that we didn’t get it done.’’

After Robinson Cano’s first-inning, two-run homer, the Yankees didn’t score and failed to support a solid eight-inning, two-run start by Hiroki Kuroda.

The 18 innings was four short of the longest game by the Yankees, which was a 22-inning win over the Tigers in 1962.

“We had two runs in the first and that was it. We had a ton of opportunities and weren’t able to cash in,’’ Girardi said. “It’s frustrating. You’ve got to turn the page.’’

After Warren worked from the 11th through the 16th, Girardi called on Preston Claiborne to start the 17th. When the rookie right-hander, who was pitching in the third straight game, started to lose velocity, Girardi called for Mariano Rivera with a runner on first and one out.

Two broken-bat singles to left, the last by Nate Freiman, made a loser out of Claiborne, and left Rivera to answer questions.

Did warming in the bullpen multiple times in extra innings take anything out of him? How about entering a game during an inning, something he doesn’t often do?

“I knew what I had to do. I was ready,’’ Rivera said. “No excuses. Sometimes they hit a line drive at somebody, it’s the give and take.’’

Girardi said his decision to use Rivera was a precaution against possibly injuring Claiborne.

“I’m not going to hurt someone. That’s the bottom line. I thought his fastball was down a couple of ticks,’’ Girardi said. “And I thought I’d bring in Mo, who has not pitched in a while. It didn’t work out.’’

Nothing worked out for the Yankees across the past three games. CC Sabathia and Phil Hughes didn’t pitch well. Wells, Hafner, Youkilis and Teixeira didn’t get out of slumps. And the Yankees got swept.

“We are happy to leave this place,’’ said Wells,who threw out Brandon Moss at the plate in the 15th inning and went 0-for-8.

That’s understandable, but the same bats that haven’t produced lately also made the trip south to Anaheim.

george.king@nypost.com