Less than a week in pinstripes and before he played a game at Yankee Stadium, Brent Lillibridge was already fitted for goat horns because of a huge error playing a position Alex Rodriguez was slated to handle by now.

And standing on deck in the ninth inning, Lillibridge knew that if Eduardo Nunez didn’t get on base against Joe Nathan that Joe Girardi was going to use Travis Hafner to pinch hit.

Watching Nunez battle Nathan, Lillibridge decided he needed a mental adjustment.

“I stopped pouting after a couple of pitches,’’ said Lillibridge, who watched Nunez’s triple score Vernon Wells to tie the score.

With Luis Cruz unavailable due to a knee injury that will likely land him on the DL, possibly as soon as today, Girardi had nobody else but catcher Chris Stewart to play third if he hit for Lillibridge, a journeyman utility player.

So the manager stuck with Lillibridge and watched him dump a slider into left field for a single that plated Nunez and lifted the Yankees to a 5-4 victory in front of a stunned Rangers Ballpark crowd of 42,739.

“I was trying to stay up the middle and I saw the slider was big,’’ said Lillibridge, who drove in the Yankees’ third run in the fourth inning with a fielder’s choice. “As the new guy you want to make plays and not make waves. I made up for it. It was a tough start to the day but finished strong.’’

After the two-run ninth that made a winner out of Joba Chamberlain, who received a huge assist from Brett Gardner’s diving grab on Elvis Andrus’ two-out fly to center in the eighth, Mariano Rivera worked a perfect ninth for his 32nd save in 34 chances.

The victory enabled the Yankees to remain seven games back of the AL East-leading Red Sox, who beat the second-place Rays in Boston.