SAN DIEGO (AP) — Trent Grisham stood at the plate for a moment watching his fly ball sail into the right field corner of Petco Park, not knowing if it would come down fair or foul.
It clanged off the foul pole for a two-run walkoff home run to lead off the 10th inning, sending the San Diego Padres to a 4-2 win over the Pittsburgh Pirates and a sellout crowd into a frenzy on Sunday.
The Padres needed something to go their way after Saturday night's brutal 4-2 loss when they stranded 16 baserunners, including leaving the bases loaded three times.
And on Sunday, they got two pivotal plays in the 10th, with Grisham's being the biggest.
He drove a 2-0 pitch from Chris Stratton (2-2) for his second career walkoff homer, which brought in automatic runner Jorge Alfaro.
"I just figured it was foul the way it was hooking," Grisham said. "The majority of the time those balls going down into the corner are foul so I was just sitting there waiting."
Grisham came into the game hitting just .161 with only one homer, one of the many Padres who are struggling at the plate. Grisham intended to bunt until the count went in his favor.
"It feels good but I want to do more of it, is about it," Grisham said.
"He has the ability to do that," Padres manager Bob Melvin said. "Hopefully this is a springboard for him. I'd love to get him up in the lineup doing what he normally does. That does a lot for your confidence when you're in a big situation like that. Typically a bunt situation for him; he swings away and hits a homer."
Alfaro, the catcher, made a huge play to end the top of the 10th. Pirates automatic runner Hoy Park, called up earlier in the day from Triple-A, broke for home on a wild pitch by Luis García (4-2) to the backstop, but Alfaro played the carom perfectly and dove to tag out Park.
"The only thing that I can remember is just catch the ball, look at the runner, I have time, try to block home plate," Alfaro said. "I was trying to slide headfirst and block home plate. I wasn't thinking that much, just trying to make the out."
Said Garcia: "That was the best play of the day. That saved the day."
Padres rookie lefty MacKenzie Gore was impressive in pitching seven scoreless innings before the Pirates broke through against Nabil Crismatt to tie it at 2-2 in the eighth.
Crismatt's 11-inning scoreless streak ended when Ke'Bryan Hayes doubled to left with one out to bring in former Padres player Tucupita Marcano, who was aboard on a leadoff single. Josh VanMeter singled in Hayes with two outs.
Hayes hit a three-run homer in the ninth inning of Saturday night's 4-2 win, when the Padres stranded 16 baserunners. It looked like it might be that kind of game again when the Padres loaded the bases with two outs against starter Roansy Contreras in the second before rookie Jose Azocar hit into a forceout.
San Diego's Jurickson Profar lined a two-run homer off Contreras to right field with two outs in the fifth, his sixth HR. It brought in Alfaro, who hit a leadoff single and advanced on a wild pitch and a groundout.
Azocar popped up a bunt to the catcher before Profar homered. Jurickson stopped before rounding first and looked at the Padres' dugout, and then raised both arms as he approached the plate.
Gore held the Pirates to two singles in seven scoreless innings — his longest outing — while striking out nine and walking three. He allowed only three baserunners to get into scoring position.
"He's pitching with a lot of confidence," Melvin said. "Early in the year it was five (innings), got him to six the last time, got him to seven this time, and told him after the seventh that you'll see some nines at some point in time if you pitch economical like this. It was just a little bit to push him to ask for the eighth.
"I don't know that there's a better rookie pitcher in baseball right now."
Gore said the goal "is just try to get a little better each outing. It was nice to be able to go seven today and be pretty efficient. Just keep building off of this."
Contreras allowed two runs and five hits in five innings, struck out three and walked one.
Pirates: Placed OF Ben Gamel on the 10-day injured list with a strained left hamstring.
Padres: Slugger Manny Machado, who leads the NL with a .357 average, missed his second straight game with tennis elbow. Melvin said Machado will be back in the lineup on Monday.
Pirates: RHP Zach Thompson (2-4, 5.50 ERA) is scheduled to start Monday night in the opener of a three-game series at the Los Angeles Dodgers, who will counter with RHP Walker Buehler (6-1, 2.91).
Padres: RHP Nick Martinez (2-2, 3.86) is scheduled to start Monday in the opener of a three-game series at St. Louis. The Cardinals will put LHP Packy Naughton (0-1, 2.89) on the mound.