Michael Pineda’s uneven season ended on a sour note Friday night as the righthander allowed five runs in 4 1⁄3 innings in the Yankees’ 8-1 loss to the Orioles at soggy Yankee Stadium.

Pineda (6-12, 4.82 ERA) set a career high with his 32nd start of the season. It also was the 100th of his career. But he did nothing to set himself up as a trusted starter for the 2017 Yankees.

Pineda, who allowed fifth-inning home runs by Adam Jones (No. 29, solo shot) and Mark Trumbo (No. 47, two-run homer), finished the season with 27 homers allowed, the most on the Yankees, in 175 2⁄3 innings. He also finished with 207 strikeouts.

“This is a pretty tough year for me,” Pineda said. “I was up and down. I stayed healthy all year. I made 200 strikeouts for the first time in my career. Be ready for next year and be better.”

James Pazos allowed a three-run home run by Jonathan Schoop (No. 25) with two outs in the fifth as the Orioles expanded a 2-1 lead with a six-run inning.

The Orioles, who currently own the first wild card, are a game ahead of the Blue Jays, who have a half-game lead on the Tigers and a one-game lead over the Mariners in the race for the second wild card.

advertisement | advertise on newsday

Joe Girardi rested the banged-up Brett Gardner and Starlin Castro but otherwise played his regulars on the wet field because the Orioles are still playing for something. It rained throughout the game.

After the fifth, Girardi started removing his remaining veteran starters, giving the game a spring training feel (except for the awful weather).

The conditions were miserable from start to finish. If the game had been played at any other time, it might have been rained out. But Major League Baseball wants to get the games involving contending teams in if at all possible.

Yankees videos

“It was ugly,” Mark Teixeira said. No one argued.

Notes & quotes: Luis Severino will start Saturday in place of Masahiro Tanaka, who hasn’t pitched since Sept. 21 because of a forearm strain. “He’s healthy,” Girardi said. “It just didn’t make any sense to us [to pitch Tanaka].” . . . Gary Sanchez went 0-for-3 and has one hit in his last 26 at-bats. The rookie’s batting average dropped to .298 . . . The retiring Teixeira was presented a guitar by the band Twisted Sister before the game. Teixeira uses the band’s “I Wanna Rock” as his walk-up music.

advertisement | advertise on newsday