SAN DIEGO — With the NL West won by the Los Angeles Dodgers, the San Francisco Giants have six more games to try to clinch a wild-card berth.

The good news is, they don’t have to play the San Diego Padres anymore.

Rookie Manuel Margot tripled in the seventh inning and scored the go-ahead run on Wil Myers’ single as the Padres beat San Francisco 4-3 to drop the Giants a game behind the New York Mets in the NL wild-card race.

The Mets beat Philadelphia 17-0. St. Louis began the day a half-game behind the Mets and Giants.

A few minutes before this game ended, the Dodgers beat Colorado 4-3 in 10 innings to win the NL West title. The Dodgers came into Sunday seven games ahead of the Giants.

The Padres split the four-game series and beat the Giants for the eighth time in 10 games since the All-Star break. San Francisco had swept the Padres three times in the season’s first two months.

“You know it’s coming, so we’re battling for the wild card,” said manager Bruce Bochy, who managed the Giants to World Series titles in 2010, 2012 and 2014. “You know that’s inevitable, that was going to happen. You understand that, and sure you’re always disappointed you don’t win your division, but right now our focus is keep trying to win games and get there and have a shot at it.”

The Giants finish at home with three games against the Rockies and three against the Dodgers.

Myers said the Padres didn’t necessarily savor helping ruin the Giants’ chances at the division title.

“The only thing we’re focused on is playing good baseball,” Myers said. “Obviously we want to win every game. We’re not going out there (with) our goal to beat the Giants. Our goal is to get better and get these younger guys experience.”

Why have the Padres dominated the Giants, who led the NL West by 6 ½ games at the break?

“We’ve just played better baseball,” Myers said. “I feel we’ve been pretty good here in the second half. I think we’ve done a lot of good things and I like where our team’s at.”

Margot, called up Wednesday from Pacific Coast League champion El Paso, tripled to right center off Cory Gearrin (3-2) with one out in the seventh and scored on Myers’ single.

Margot doubled in the first and hit an RBI single in the second, both off rookie Ty Blach, who was making his first big league start, in place of the injured Johnny Cueto.

Brandon Morrow (1-0) got two outs for the victory. Brad Hand got the last five outs for his first save.

San Francisco took a 3-1 lead in the third off lefty Clayton Richard. Buster Posey hit a two-run single and an RBI groundout by Kelby Tomlinson.

One run was unearned due to catcher Austin Hedges throwing the ball away trying to get Trevor Brown at second base on Blach’s bunt. The bunt went only a few inches in front of home plate and Blach had a hard time getting out of Hedges’ way.

It took a moment for Hedges to get the ball and he rushed his throw. Padres manager Andy Green came out to argue, to no avail.

San Diego tied it on Adam Rosales’ home run with two outs in the third inning off Blach and Yangervis Solarte’s RBI single in the fifth off George Kontos.

The Padres had taken a 1-0 lead when Margot singled in Hedges in the second.

Blach pitched three innings, allowing two runs and four hits, striking out three and walking three.

“I just didn’t execute as many pitches there in the first,” Blach said. “The situation kind of dictated pitch around a little bit there and try to get to the lefty, there were two outs, a couple guys on, so we did that a little bit, and the pitch count just got away from me there.”


Giants: SS Brandon Crawford returned to the starting lineup for the first time since dislocating the pinky on his glove hand on Tuesday night. … Bochy said he hopes Cueto (groin) can start Thursday night. … 3B Eduardo Nunez left after spraining his right hamstring stealing second base in the seventh.


Giants: After a day off, San Francisco opens its final homestand of the season with three games against Colorado starting Tuesday night. LHP Matt Moore (11-12, 4.34) is scheduled to oppose RHP German Marquez (1-0, 3.48).

Padres: The team is off Monday before finishing its home schedule with three against the Los Angeles Dodgers starting Tuesday night, when RHP Paul Clemens (3-5, 4.48) is scheduled to start for San Diego in Tuesday’s night game.