New York Yankees’ Mark Teixeira watches his three-run home run off New York Mets starting pitcher Steven Matz during the second inning of a baseball game Wednesday, Aug. 3, 2016, in New York. (AP Photo/Kathy Willens) more >

NEW YORK (AP) - Mark Teixeira brought the Subway Series to life with his bat, his legs, his temper and even some head games that caused him to grin like the Cheshire Cat.

Teixeira hit a tiebreaking, three-run drive off Steven Matz in the second inning for his first home run against a left-hander in more than a year, then got hit by a pitch that sparked a bench-clearing dustup in the New York Yankees’ 9-5 win over the Mets on Wednesday night.

Two innings later, Mets reliever Hansel Robles lost his composure at Yankee Stadium and started shouting when he thought Teixeira was stealing signs while taking a lead off second base.

“If you think I have them, then change the signs,” Teixeira said. “Don’t try to challenge me to a duel.”

Teixeira’s home run, the first for the switch-hitter off a lefty since July 31 last year, put the Yankees ahead 6-3. When he batted in the fifth, Matz’s first pitch hit Teixeira on the left shin.

“Are you kidding me!” Teixeira yelled.

“I know Matz is a good kid. I like him a lot. I’ve talked to him a few times, but listen, when you hit a home run and the next pitch is not even close to the plate and hits you, it just looks bad,” Teixeira said after the game. “If it was on purpose, it’s uncalled for. If it wasn’t, it just looked really bad.”

After Gary Sanchez got his first big league hit in the seventh and scored on Rob Refsnyder’s sacrifice fly for a 7-4 lead, Teixeira was at second with the bases loaded when Teixeira got into Robles’ head.

With the count 1-2 on Starlin Castro, catcher Rene Rivera went to the mound, was urged to head back to the plate by umpire Nic Lentz, then returned to the mound briefly before squatting for the next pitch.

Robles stepped off, stared at Teixeira, and Rivera came out to the mound again. Two pitches later, with Teixeira smirking, Rivera went back to the mound for another conversation, then returned to the plate as infielders Kelly Johnson and Wilmer Flores went to the mound.

“Forget about it. Just pitch and throw the ball,” Rivera recalled telling Robles.

Castro beat out an RBI infield hit, ending a 5-minute at-bat, and Robles was taken out by Mets manager Terry Collins. While walking to the dugout, Robles barked at Teixeira.

“That was funny. After three or four pitches, I realized that he’s like staring at me and he thinks I have his signs,” Teixeira said. “So I just started having some fun with him. I didn’t have his signs. I was breathing. … It got worse and worse, and he kept staring at me more and more and yelling stuff, so I just kind of started having some fun. … I’ve never got inside someone’s head just standing there. It’s a talent, I guess.”

Robles was convinced Teixeira was up to no good.

“I got a little upset,” he said through a translator. “That’s not the way you play baseball. You have to play baseball as a man.”

Collins said his pitcher should have adapted.

“All he’s got to do is certainly have a different plan and change signs,” he said. “At that particular point in the game, we were getting back in the game. So, you’ve got to maintain your composure and get some big outs to get us back in the dugout.”

The slow-footed Teixeira also scored a tying run from first base in the first inning on Chase Headley’s two-run double. He is hitting .198 with 10 home runs.

Matz insisted he didn’t deliberately hit Teixeira.

“It may seem like on purpose, but I really didn’t,” the rookie said.

On a night when the Mets dropped 8 1/2 games behind NL East-leading Washington and two games back for the league’s second wild card, slugger Yoenis Cespedes aggravated his strained right quadriceps while swinging at a ninth-inning pitch from Tyler Clippard.

Cespedes struck out on the next offering, and new Mets outfielder Jay Bruce followed with a game-ending groundout, completing his second straight 0-for-4 night.

Cespedes will go on the disabled list Thursday, and rookie Brandon Nimmo will be recalled from Triple-A Las Vegas.

“I think the best option is just rest about 10 days or so, because if I continue playing hurt, I’m not going to recover,” Cespedes said through a translator.

FOR STARTERS

Chad Green and Matz (8-8) both struggled, and Luis Severino (1-6) came out of the bullpen with 4 1/3 innings of one-hit relief for his first big league win since last Sept. 27. Green pitched in the slot of traded Ivan Nova, and it is possible Severino will take the next turn.

KIDDIE KORPS

Sanchez went 1 for 4 at designated hitter, a job held by Alex Rodriguez in the first half of the season and Carlos Beltran for much of July. Sanchez was assigned No. 24, down from No. 57 earlier this season and No. 73 late last year.

NEW LOOK

With Aroldis Chapman, Andrew Miller, Beltran and Nova all traded for prospects. Beltran’s locker, the one by the bathroom entrance used previously by Jorge Posada and Robinson Cano, was empty, as were the stalls of Chapman and Nova. Clippard moved into Miller’s space.

TRAINER’S ROOM

Yankees: LHP Jacob Lindgren will have Tommy John surgery Friday, an injury that likely will sideline him until the 2018 season. New York said team physician Dr. Christopher Ahmad will operate at New York-Presbyterian Hospital.

UP NEXT

RHP Nathan Eovaldi (9-7) starts for the Yankees and RHP Bartolo Colon (9-6) for the Mets in Thursday night’s Subway Series finale.