SAN DIEGO (AP) Melvin Upton Jr. helped the San Diego Padres end their losing streak in dramatic fashion.
Upton hit a two-run homer in the bottom of the ninth inning to lead the Padres past the Los Angeles Dodgers 7-6 on Friday night, snapping a four-game skid.
After Wil Myers hit a bloop single to shallow center to lead off the ninth against Dodgers closer Kenley Jansen, Upton went the opposite way beyond the right-center field fence for the comeback victory.
''It is big out there, so I didn't know if it was going out,'' Upton said. ''I knew I hit it pretty good. It was cool. We fought hard and it was a back-and-forth game. Our pitchers kept us in the game the whole time. Luckily, we found a way to pull it out.''
Kevin Quackenbush (2-2) pitched a scoreless ninth to earn the win for the Padres, who had lost four straight.
''That was a fun major league baseball game,'' Padres manager Andy Green said. ''It was fun for the fans, and certainly more fun for us being on the winning end.''
Jansen (1-1) had converted all 14 of his save chances before Friday.
''I've faced him a few times, but I don't think I really had much success against him,'' Upton said. ''He is a good closer - he's one of the best in the game. I just got a pitch I could hit.''
Justin Turner hit a two-run homer in the eighth inning that had given the Dodgers a 6-5 lead.
Los Angeles had won six in a row at Petco Park since Sept. 4, 2015, including sweeping the opening series of the season against the Padres with three shutouts.
''To beat a team in the NL West division like that is big, and it was a good win for us,'' Myers said. ''Melvin has been great. He has been really good, especially of late. He's a guy that a lot of us look to as a leader on the team, and if he can keep doing things like that, he's going to do big things this year.''
Yasiel Puig broke a 2-2 tie in the fifth with an opposite-field homer off Carlos Villanueva.
''Tonight was a head-scratcher and I'll take that matchup any day,'' Dodgers manager Dave Roberts said. ''Kenley has been lights out for us and we can't expect him to be perfect. Melvin put a good swing on that ball and took it out of the ballpark.''
Christian Bethancourt and Derek Norris homered for the Padres, both off Dodgers starter Scott Kazmir, who allowed five runs and three hits. He struck out five and walked a season-high seven.
''I just felt like I was fighting myself for pretty much the whole game,'' Kazmir said. ''I was getting behind in counts and not throwing good pitches down in the count.''
Bethancourt, normally San Diego's backup catcher, was originally in the starting lineup in right field, but was swapped for Jose Pirella after taking flyballs during pregame drills. Bethancourt pinch-hit in the sixth and drove the first pitch from Kazmir off the second deck in right field for a 5-4 Padres lead.
''You see why I wanted him in the lineup,'' Green said. ''He came in and drove the first pitch he saw out of the ballpark.''
Christian Friedrich started for San Diego and got his first major league RBI with a two-run single in the second that put the Padres ahead 2-0. It was the only hit Kazmir gave up until Norris homered in the fifth to cut the Padres' deficit to 4-3.
Friedrich exited after 3 1/3 innings, allowing two runs and six hits. He walked three and struck out two.
Ryan Buchter struck out the side for San Diego in the seventh and has not allowed a run in 17 1/3 innings.
Corey Seager extended his hitting streak to a career-high 11 games for Los Angeles.
Dodgers: 1B Adrian Gonzalez (back) was out of the starting lineup for the fourth straight game, but entered as part of a double-switch at first base in the eighth.
Padres: IF Yangervis Solarte (hamstring) continued his rehab assignment at Triple-A El Paso on Friday, and could rejoin the club as early as Sunday.
Dodgers: LHP Alex Wood (1-3, 4.17) starts on Saturday night. He did not factor in the decision in his last outing after giving up one run and three hits in six innings against St. Louis.
Padres: RHP Cesar Vargas (0-2, 3.55) takes the mound for San Diego. He is making his sixth start since being recalled from Double-A San Antonio on April 23.