Perhaps the only thing that prevented the Yankees from getting eliminated in the AL East race Tuesday night was the wet weather down in Baltimore.

Michael Pineda didn’t do much to help.

The righthander was hit hard at the start, and New York’s playoff push was delayed once again by its longtime rival when the Boston Red Sox got two homers and five RBI from rookie catcher Blake Swihart in a 10-4 victory.

“We just need to take a deep breath and come back and win a game tomorrow,” said Yankees slugger Alex Rodriguez, who struck out twice and grounded into a double play while going 0-for-4.

Rick Porcello (9-14) recovered neatly from a rocky first inning, Mookie Betts added a solo home run and the Red Sox won their season-best fifth consecutive game to pass the Orioles for third place.

“There’s not alarm.” Rodriguez said. “Let’s make it clear: That team is playing really good baseball. That’s a different team than we saw all spring and summer, so give those guys credit. They’re playing hard.”

“This is their playoff and they want to make an impact, and we would be the same way playing against them,” he added.

New York is second in the division and was spared the possibility of the Blue Jays clinching the crown when they were rained out in Baltimore. Toronto will play a doubleheader Wednesday against the Orioles.

Pineda (12-9) and the Yankees began the day looking to lock up at least a wild card, but that chance was washed away when Minnesota was rained out in Cleveland. New York needs two wins in its final five games — or some help — to reach the postseason.