Updated

SAN DIEGO (AP) -- Melvin Upton Jr. capped a remarkable first half for the San Diego Padres with a magnificent walk-off home run.

Upton hit a 440-foot homer on the first pitch of the ninth from Andrew Miller to give the Padres a 2-1 victory against the New York Yankees on Saturday night.

It was his third walk-off homer of the season, a team record, landing in the second balcony on the Western Metal Supply Co. brick warehouse in the left-field corner.

"I've seen him a lot in the past, so I had a pretty good feel for him and just got something I could handle," said Upton, who has 13 homers. `'You never go up and try to hit a home run, just go up and try to put a good A-B together against a very good pitcher."

It was Upton's seventh career walk-off homer and his 11th career walk-off hit.

Upton said this season, his second in San Diego, is "probably the most fun in a while, but I'm just glad to have the opportunity to play every day, man."

Upton, limited to 87 games last year due to a foot injury, has five more homers than his brother, Justin, who was his teammate with the Padres last year before signing with Detroit.

"He's done it enough, hasn't he?" manager Andy Green said. "It's almost ridiculous how good he's been in pivotal situations. He continues to amaze. He's a low-heartbeat guy. There's not a lot that ruffles him. He's really even-keel. I think to some degree he's probably gotten a bad rap for that over the years, like there's nothing that fazes him. He's just smooth, glides through the game, everything's relaxed."

Miller said he tried to throw a fastball down and away. "That pitch is much better located for him. I didn't do it. I wasn't very sharp in general and I paid for it.

"I just wasn't very good," Miller said. "It was not where I wanted to throw that ball. I paid for it, unfortunately. It would have been nice to get some more at-bats. I just didn't do my job."

Miller (5-1) was starting his second inning for the Yankees.

Brad Hand (2-2) pitched the ninth for the win.

There were three replays that took a total of 10 minutes, 10 seconds. Among them was Matt Kemp being thrown out trying to score from second on Upton's single to right to end the sixth.

"I thought all three of those were ridiculously close today," Green said. "All of them hurt us, but at the end, Melvin did what he does."

Starters Ivan Nova of the Yankees and Drew Pomeranz of the Padres each allowed one run before turning it over to the bullpens.

New York took a 1-0 lead in the sixth when Jacoby Ellsbury hit a leadoff double, advanced on Brett Gardner's bunt single and scored on Starlin Castro's groundout.

San Diego tied it in the bottom of the inning when Wil Myers walked and scored on Kemp's double. Kemp tried to score on Upton's single to right, but Rob Refsnyder made a great throw home to Austin Romine, who then blocked the plate with his left foot and tagged Kemp. The Padres challenged, but the call stood after a review of 3:19.

The longest replay was 4:20 after Romine was thrown out after a nice throw by third baseman Yangervis Solarte on a slow roller. The call was overturned and Romine was safe with an infield single, but Nova struck out to end the inning.

Nova held the Padres to one run and four hits in 5 2/3 innings, struck out seven and walked one.

Pomeranz also allowed just one run, and five hits, while striking out seven and walking none.

"The problem tonight was we didn't score," Yankees manager Joe Girardi said. "Pomeranz has an outstanding curveball and we never were able to solve it. He was tough on our guys. It looked like it might be a 1-0 game."

TRAINER'S ROOM

Yankees: Girardi said Carlos Beltran, slowed by a tight right hamstring, will be the DH Monday at Chicago.

Padres: Manager Andy Green said RHP Erik Johnson has a flexor tendon strain and is expected to be out for three to six weeks.

UP NEXT

Yankees: RHP Chad Green (0-1, 7.20) is expected to be recalled from Triple-A Scranton/Wilkes-Barre for his third stint with the team. It'll be his second career start and third appearance.

Padres: RHP Andrew Cashner (3-5, 4.75) is due to come off the disabled list to make his first start since June 10, when he was removed from his start at Colorado with a strained neck after throwing just six pitches.