Washington Nationals rookie Blake Treinen was all ready to celebrate his first major league win when San Diego's Yonder Alonso homered with two outs in the ninth inning to tie the game.
The Nationals went on to lose 4-3 when Cameron Maybin hit an RBI bloop single with two outs in the 11th.
Treinen was on track for the win after Ian Desmond hit a 432-foot, two-run homer with two outs in the seventh inning to give the Nationals a 3-2 lead.
Treinen was making his third career start. He allowed two runs and five hits in six innings, struck out one and walked one. After his last start on May 22 his spot was skipped due to two days off.
"He pitched well," manager Matt Williams said. "We had an opportunity there to go to our pen, which has been so good. He was still in the 60s in his pitch count, but having such a long layoff. Us taking the lead there, set up well for us."
The rookie said he could have gone longer, "but the situation has been told to me that when I get some more starts under my belt, I'll be able to go longer.
"I felt good physically," he said. "I felt like was getting myself in trouble by getting behind in counts. But I made pitches when I needed to and then in that one inning I threw some pitches out over the plate."
San Diego had gone ahead 2-0 in the fourth on RBI doubles by Headley and Maybin.
Chase Headley started the winning rally when he singled to left with two outs off Craig Stammen (0-2). Alonso walked before Maybin singled in front of right fielder Jayson Werth. Headley easily beat the throw home.
Joaquin Benoit (2-0) pitched a perfect 11th for the win.
Alonso tied the game at 3 in the ninth when he homered into the Jack Daniel's party deck atop the right-field wall on a 1-1 pitch from Rafael Soriano. It was Alonso's fifth homer and Soriano's second blown save in 14 opportunities.
"That's it, that was the game on one pitch," Soriano said.
"I was trying to go sinker down and away and I see the pitch and it was high right in the middle and there was nothing I could do."
The Padres had the potential winning run on second after Rene Rivera doubled off the left-field wall with one out in the 10th. Chris Denorfia struck out and Everth Cabrera flied out to left.
Rivera was stranded at third in the eighth after he doubled to left and was sacrificed by pinch-hitter Denorfia. Cabrera flied out to center and Carlos Quentin, pinch-hitting for left-hander Will Venable against righty Tyler Clippard, struck out.
San Diego right-hander Andrew Cashner left with a 2-0 lead after six innings in his return from the disabled list. The tall Texan allowed only two hits, struck out five and walked one in 70 pitches. Out since mid-May with a sore right elbow, Cashner retired his final 16 batters and lowered his ERA to 2.13.
Nick Vincent came on and surrendered the lead in a span of five batters. Adam LaRoche doubled with one out and scored on Ryan Zimmerman's double to right. With two outs, Desmond homered well over the 396 sign in center field.
NOTES: The Padres drafted Johnny Manziel, the Cleveland Browns quarterback and 2012 Heisman Trophy winner while at Texas A&M, in the 28th round of the MLB draft, the 837th player taken. ... The Nationals drafted Ryan Ripken, the son of Hall of Famer Cal Ripken Jr., in the 15th round. ... Nationals 3B Anthony Rendon sat out with a sore right hand. He was struck trying to field Carlos Quentin's smash in the fourth inning and committed a throwing error. He committed a fielding error the next inning. Williams said Rendon's hand was swollen and "pretty sore." ... To make room for Cashner, LHP Jason Lane was designated for assignment. ... The series concludes Sunday when RHP Jordan Zimmermann (4-2, 3.59) is scheduled to start against lefty Eric Stults (2-6, 5.03).