Jim Johnson’s wild pitch eludes catcher Matt Wieters as umpire Jim Wolf and Yankees hitter Alex Rodriguez watch in the ninth inning. Brendan Ryan scored the winning run for New York on the play. (Patrick Semansky/Associated Press)

The Baltimore Orioles headed into this week’s four-game series at home against the New York Yankees knowing they had a chance to bury one of their closest rivals in the American League wild-card race.

But after dropping three of four to the Yankees — including Thursday’s gut-punching, 6-5 loss before an announced 24,659 — the Orioles (77-69) are in a tie for fifth in the wild-card race with Kansas City, 21 / 2 games behind the Tampa Bay Rays for the last wild-card spot.

Perhaps no game this season was as painful to stomach for the Orioles and their fans as Thursday’s, when Danny Valencia hit a two-out, three-run homer in the eighth to tie it at 5-5 only to see closer Jim Johnson implode in the top of the ninth. Johnson (3-8) allowed a single, made an error on a sacrifice bunt and then uncorked a wild pitch to allow the go-ahead run to score.

Johnson’s missteps set the stage for Mariano Rivera to make one final appearance at Camden Yards in his brilliant career.

Honored before the game with a baseball bat sculpture, the retiring Rivera padded his career-best total against one big-league team by making his 136th appearance, but he didn’t get his 80th save versus the Orioles.

Instead, with a perfect ninth, Rivera (6-2) was awarded the win via the official scorer’s decision because set-up man David Robertson, who surrendered the homer to Valencia, was brief and ineffective in his outing.

Either way, the Orioles’ gradual disappearance from the playoff picture continues. The credit for that goes to a difficult second half in which the club is 24-26.

— Baltimore Sun