Now batting sixth, Alex Rod riguez. And what better way to celebrate a demotion in the lineup than with a home run?

While Yankees stars of yesteryear — including Rodriguez himself — were known to complain about their spot in the order, the Yankees’ DH did not this time. How could he when he came in hitless in his previous 19 at-bats, all in the third spot, and was batting .100?

“Whatever Joe [Girardi] wants, I’m here to do. I love Joe,’’ Rod riguez said Sunday after hitting a two-run shot in a 4-3 victory over the Mariners that snapped a four-game losing streak. “He knows best. He gave me some good advice and I hit a home run. So sometimes you’ve got to do that, you got to shuffle the deck a little bit, and whatever it takes to win, I’m willing to do.’’

A-Rod’s second-inning homer erased a 1-0 deficit. With Brian McCann on first after being hit by a pitch, Rod riguez sent Hisashi Iwakuma’s first pitch into the leftfield seats for his second homer of the season.

Iwakuma was opposing Masahiro Tanaka in Major League Baseball’s first pitching matchup of former Japanese teammates. Tanaka (1-0) pitched seven innings and Dellin Betances and Andrew Miller struck out the side in the eighth and ninth.

The Yankees took a 3-1 lead in the third when Brett Gardner (three hits) doubled in Jacoby Ellsbury, but the Mariners made it 3-2 in the fourth. Kyle Seager’s hard grounder went through the legs of first baseman Mark Teixeira for a two-base error and Steve Clevenger delivered a two-out RBI single. In the fifth, Norichika Aoki tripled to center when Ellsbury’s diving attempt came up empty and the ball shot past him toward the wall. Seth Smith’s single made it 3-3.

advertisement | advertise on newsday

“If he makes the catch, you say great play,’’ Girardi said of Ellsbury. “If he doesn’t, you’re going to question should he have dove for it. I thought he gave a really good effort and he came up a little bit short, so that doesn’t frustrate me.’’

The Yankees scored the go-ahead run in the fifth when Gardner came home on a wild pitch by Iwakuma (0-2). The ball trickled only a short distance behind Clevenger, but Gardner got a good read on it and beat the catcher’s toss to Iwakuma.

Before the game, Girardi told Rodriguez he was going to bat Carlos Beltran, who had four hits on Saturday, in the third spot.

“I just let him know,’’ Girardi said. “He’d been struggling and Carlos had some success off of Iwakuma, so I just decided to make the change. As I said before the game, it’s not necessarily permanent. [Last year] Alex started seventh in our lineup and worked his way up. I just thought I would change it up a little bit today. I’m not sure what I’ll do on Tuesday.’’

Girardi has basically had it with questions about Rod riguez’s slump and implications that he might be through as he approaches 41 in July.

Yankees videos

“Pressure comes from within. Every player wants to do well,’’ Girardi said. “That’s where the most pressure comes from. He hit a two-run homer, so that was nice.’’

When pressed on his thought process in making the change, Girardi grew testy. “You know what, I went and saw a shrink,’’ he said. “And had him analyze what I should analyze and I went from there. That’s what I did.’’

Rodriguez said Girardi “told me to stop feeling for the baseball and try to drive it. It was good advice. I didn’t try to do too much.’’

He went 1-for-4 to raise his average to .118. “I thought my rhythm was better out there,’’ he said. “I got one hit but I felt my swings were better.’’

A-Rod is 11 homers shy of 700. “That’s the last thing I’m thinking about right now,’’ he said. “I’m just so happy I was able to contribute today and help us win the game.’’