NEW YORK — Derek Jeter and the New York Yankees were eliminated from postseason contention, wasting a three-run lead Wednesday in a 9-5 loss to the AL East champion Baltimore Orioles.

Jeter went 0 for 4 as the designated hitter in his next-to-last game home game, ending a seven-game hitting streak and dropping his average to .253.

The Yankees missed the playoffs in consecutive years for the first time since 1992 and ’93. The only other time New York missed the playoffs in the retiring captain’s 20-season big league career was 2008.

“It’s disappointing. It’s frustrating,” said Yankees manager Joe Girardi. “This is not where you want to be at this time of year.”

Trying to play through injuries to four-fifths of their starting rotation, the Yankees are 81-77 and still trying to ensure a 22nd straight season with a winning record. New York played the entire season without star third baseman Alex Rodriguez, who was suspended after a drug investigation by Major League Baseball.

The Yankees were eliminated with four games remaining for the second straight year. They are scheduled to end the home portion of their schedule Thursday night, when Jeter is expected to be lauded by fans for a career that included five of New York’s 27 World Series titles. Rain is in the forecast.

Baltimore is headed to the playoffs for the second time in three seasons.

Baltimore’s Nelson Cruz had two of his four singles and slugger Adam Jones had a safety squeeze in a six-run fourth for Baltimore.

As they have throughout the final homestand, fans stood, cheered and chanted “De-rek Je-ter!” for each of his at-bats during a rare September mid-week afternoon game.

Stars were out to say goodbye to Jeter. Former teammates Tino Martinez, Gerald Williams and Cecil Fielder were on hand, as was Mo Vaughn, the 1995 AL MVP with Boston. Willie Randolph, a former Yankees co-captain and coach, caught a foul ball behind home plate.

Jeter was given an extended ovation after he tapped out to first base in the eighth but he remained seated in the dugout and did not come out for the curtain call. The game ended when Brett Gardner struck out looking with Jeter on deck.

Portland’s Ryan Flaherty had a bases-loaded two-run double and David Lough an RBI triple. Greene exited to boos after Jones bunted toward third base with Headley playing deep for a 6-3 lead.

Mark Teixeira had an RBI double and two-run homer for New York.