Struggling Yankees ace Masahiro Tanaka rose to the occasion in the first major league matchup with countryman Yu Darvish on Friday.

On a rainy night at Yankee Stadium in a game that was delayed by 1 hour, 42 minutes, Tanaka and Darvish locked horns for 7-1/2 innings in a nearly flawless pitching duel. The Yankees eventually outlasted the Rangers, when New York's defensive hero Ronald Torreyes ended it 2-1 with a walk-off single in the 10th inning.

"For two Japanese pitchers to go toe to toe in a place like Yankee Stadium is I think extremely meaningful," Darvish said.

While Darvish has been sharp most of the season, Tanaka entered their first big league clash having lost his last six decisions. But when he finally took the mound in the top of the first, Tanaka was as sharp as he's been since joining the Yankees in 2014.

He located all his pitches and complemented some wicked sliders and splitters with high four-seam fastballs. Tanaka allowed three hits and two walks over eight innings, while striking out nine in a 100-pitch outing.

"I was bailed out by my defense and (catcher Gary) Sanchez called a great game," Tanaka said. "Of course, I was conscious that I was going against Daru-san, but once the game started my entire focus was on my battle with the hitters."

"I was able to make each and every pitch count."

Darvish left after seven innings and only 88 pitches due to some concern about his upper right arm. He allowed two hits, while striking out 10 and walking none. The Rangers ace also brought his "A" game. He put his fastball where he wanted it and made mincemeat of Yankees hitters with a slider that is as good as it gets.

"I felt something in my (arm) about the fourth inning and I was keeping an eye on that," Darvish said. "There's a lot of the season left, and I thought that if I pushed it too hard, I could miss my next start and so I mentioned it (to the coaching staff)."

With the Yankees rarely getting good swings off him, Darvish might easily have come away with his seventh win of the season if it weren't for a couple of plays by Torreyes.

Torreyes, starting at third in place of Chase Headley, ended the third inning by starting a slick double play. With one out and two on, Torreyes went to his knees to field a sharp grounder, and got the ball rolling with an on-target snap throw to second.

He gave Tanaka a boost by robbing speedster Elvis Andrus of a leadoff double in the seventh. Torreyes spun to his right, speared the ball headed down the line, spun 360 degrees before his strong throw just beat Andrus hustling down the line to first base.

The Rangers broke the ice in the top of the ninth inning against flame-throwing lefty Aroldis Chapman. Elvis Andrus singled with one out and Chapman hit Nomar Mazara. Andrus then stole second and scored on a swinging third strike and a passed ball by Yankees catcher Gary Sanchez.

The Yankees, however, tied it with one out in the bottom of the inning on Brett Gardner's 14th home run of the season, off right-hander Matt Bush.

Yankees lefty Chasen Shreve loaded the bases in the top of the 10th but got out of the jam to set the stage for the home side in the bottom of the inning. Back-to-back, two-out singles by Gary Sanchez and Didi Gregorius off Bush put two on before Torreyes won it with two outs to bring the game to a close.

In Los Angeles, Kenta Maeda struck out one batter in an inning of relief, protecting a four-run, seventh-inning lead in the Dodgers 6-1 victory over the Colorado Rockies.