Yankees starting pitcher Domingo German hands the ball to manager...

Yankees starting pitcher Domingo German hands the ball to manager Aaron Boone as he is pulled from a game against the Rangers on Tuesday. Credit: AP / Jeffrey McWhorter

ARLINGTON, Texas — Aaron Boone decided enough was enough.

Frustrated with the plate umpire, and perhaps equally frustrated with his team’s inability to hit Cole Hamels, Boone was ejected for the first time as Yankees manager in a 6-4 loss to the Rangers on Tuesday night at Globe Life Park.

It was just the fifth loss in their last 22 games for the Yankees (31-14), who conclude a three-city trip Wednesday night.

“At different points of the night, I raised some things, I guess he had heard enough,” a still-steamed Boone said afterward of plate umpire Pat Hoberg.

Gary Sanchez, at the plate when Boone was thrown out in the top of the sixth, did not come out on defense in the bottom half of the inning, pulled because the catcher said he felt “a little cramp” in his right calf running to second base in the same inning.

“I’m fine,” Sanchez said through his translator, though he added later he wanted to see how he felt Wednesday before saying for sure he would be able to play.

Hamels, a possible Yankees trade target this summer though the money left on his contract — $22.5 million this year — makes him a long-shot acquisition, was terrific.

The lefthander (3-4, 3.38 ERA) threw a season-high seven innings, allowing two runs and four hits. Hamels, who departed with a 6-2 lead, walked two and struck out seven.

Two of the hits were home runs by rookies — Gleyber Torres, a solo homer in the third that made it 5-1 and gave him seven overall and three in two nights, and Miguel Andujar, who hit his fifth in the seventh inning to make it 6-2.

Austin Romine, who replaced Sanchez, hit a two-run homer in the eighth off Jake Diekman to pull the Yankees within 6-4. Romine’s blast made it 17 homers in the last four games for the Yankees. Keone Kela pitched a perfect ninth for his ninth save.

Domingo German (0-2), making his third start since taking over for the injured Jordan Montgomery, allowed six runs, four hits and three walks in 3 2⁄3 innings. He was charged with three wild pitches in a sloppy second inning, when the Rangers increased their lead to 5-0, though Sanchez’s difficulties blocking breaking pitches was again evident.

“I was able to block a couple of those but the ball went far away and the runners were able to take advantage of that,” Sanchez said. “German was trying to execute some pitches there, command was a bit off.”

Boone, ejected five times as a player, including in his big-league debut in 1997, was tossed after boisterously objecting to a Hamels fastball that was called a strike on Sanchez that evened the count at 1-and-1 with two outs in the sixth.

Hoberg tossed Boone, who then charged from the dugout and got in the face of the umpire, using at times colorful language. Among the irritations Boone had with Hoberg in the game was during Aaron Hicks’ at-bat to lead off the sixth. Hicks said before he stepped in the box, Hamels started his windup and he requested time.

“He [Hoberg] didn’t grant it,” said Hicks, who nonetheless ended up getting a single later in the at-bat.

Boone’s ejection went over well in the clubhouse.

“You have to fight for your team as a manager,” Hicks said. “Whenever you feel like things aren’t going your way, it’s important for you to be the voice for us.”

Said Sanchez: “Boonie’s going to look out for us. He was trying to help me during that at-bat there. I thought the pitch was high. I guess he said something to the umpire, who threw him out.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME