NEW YORK — The New York Yankees are in need of a reliable ace right now. Hiroki Kuroda has been the man for the job.
Kuroda pitched a two-hitter and the Yankees got consecutive homers from Nick Swisher and Mark Teixeira in a 3-0 victory over the Texas Rangers on Tuesday night.
In his first season with New York, the 37-year-old Kuroda gave a depleted rotation yet another boost with ace CC Sabathia and veteran Andy Pettitte on the disabled list.
‘‘This is a very good lineup that he just shut down,’’ Yankees manager Joe Girardi said. ‘‘Probably our best pitching performance of the year.’’
Kuroda allowed only four balls out of the infield and just one runner past first base. He held Texas hitless until Elvis Andrus’ infield single leading off the seventh, outpitching All-Star lefty Matt Harrison in a crisp duel at Yankee Stadium.
The right-hander walked two and struck out five in his fourth career shutout and second this season. He threw 74 of 109 pitches for strikes.
‘‘When you’ve got a great lineup like that,’’ Kuroda said through a translator, ‘‘you can’t lose your focus until the end.’’
The surging Yankees won for the sixth time in seven games. They’ve taken the first two in a four-game set between the AL’s top two teams.
‘‘Man, these games are a lot of fun to play in,’’ Swisher said.
Derek Jeter singled off Harrison (13-7) with one out in the seventh to start the New York rally. Alexi Ogando came in to face Swisher, who cracked a go-ahead grand slam off Ryan Dempster in the series opener Monday night for his first homer since July 19 — a drought of 61 at-bats.
This time, Swisher fought his way back from an 0-2 count and drove a payoff pitch to the back of the Yankees’ bullpen in right-center for his 16th home run.
‘‘I was hitting on sound at that point. I mean, he’s throwing 100 mph,’’ Swisher said. ‘‘That 3-2 count, I was just hoping he would throw another fastball.’’
The bubbly switch-hitter rounded the bases with a big grin, and New York was on its way to a seventh straight regular-season victory over the Rangers at home.
Teixeira then lined a shot into the right-field stands for his 23rd home run.
Slowed by a lack of run support lately, Kuroda (11-8) won for the first time in four starts and lowered his ERA to 3.06. He gave up a clean single in the eighth to Michael Young, who was immediately erased on David Murphy’s double-play grounder.
Kuroda then worked a 1-2-3 ninth to finish a gem that took 2 hours, 35 minutes.
‘‘He’s been really, really big for us and he could have a number of more wins. He’s been the hard-luck guy for us this year,’’ Girardi said.