Teixeira hits 400th, 401st homers, Yankees beat Padres 6-3

New York Yankees' Mark Teixeira is congratulated by Starlin Castro after hitting his 400th career home run against the San Diego Padres in the eighth inning of a baseball game, Sunday, July 3, 2016, in San Diego. (AP Photo/Lenny Ignelzi)
Lenny Ignelzi/AP

SAN DIEGO (AP) Mark Teixeira hit his 400th and 401st home runs, Didi Gregorius also connected and Chad Green got his first big league victory as the New York Yankees beat the San Diego Padres 6-3 Sunday to avoid a three-game sweep.

The Padres were denied their first sweep of the season and what would have been their first sweep of the Yankees. New York beat San Diego 4-0 in the 1998 World Series.

Teixeira struck out in his first three at-bats before hitting a high, arcing shot into the home run porch down the right-field line off Carlos Villanueva leading off the eighth. With Brett Gardner aboard on a single with one out in the ninth, Teixeira homered to right off Kevin Quackenbush.

Teixeira became the fifth switch-hitter with at least 400 homers. He had not homered since April 13 before connecting against Minnesota last Sunday, and he homered against Texas on Monday. His first multihomer game since July 31 gave him seven home runs this season.