Jorge Soler hit a go-ahead double with one out in the 10th inning for his fourth RBI, and the Atlanta Braves won 10-8 on Saturday night to keep their 1 1/2-game lead in the NL East while eliminating the San Diego Padres from playoff contention.

The Padres were one out from a win in regulation when Eddie Rosario hit a tying single off major league saves leader Mark Melancon, who was trying for his 39th.

Soler, who hit a three-run homer in the sixth, then helped seal the biggest collapse in Padres history with his hit off Daniel Hudson (5-3). Ozzie Albies added a sacrifice fly.

San Diego, led by superstars Fernando Tatis Jr. and Manny Machado and with a payroll of more than $170 million, had a one-game lead for the second NL wild card on Sept. 9 but then went into a devastating free-fall that cost the Padres a second consecutive postseason appearance.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Richard Rodriguez (5-4) pitched the ninth and Will Smith worked a perfect 10th for his 34th save.

Machado hit a grand slam in a game that had some big swings, and Adam Frazier and Eric Hosmer also homered for the Padres. Victor Caratini hit a go-ahead single in the sixth.

Machado's slam with two outs in the fifth gave the Padres a 7-3 lead. It was his 12th career grand slam and the Padres’ seventh this season. Machado has 27 homers.

The Braves came right back and tied it in the sixth when pinch-hitter Joc Pederson delivered an RBI double and Soler hit a three-run homer, all off Nabil Crismatt. It was Soler’s 25th.

Caratini then regained the lead for the Padres with a single against Chris Martin.

All three Padres homers were off Huascar Ynoa. Frazier hit a leadoff homer, his fifth, and Hosmer homered leading off the second, his 12th. Starting pitcher Vince Velasquez added an RBI groundout in the second.

The Braves tied it at 3 after consecutive RBI singles by Albies and Austin Riley in the third and an RBI single by Riley in the fifth.

Velasquez went three innings, allowing three runs, two earned, and three hits with three strikeouts and two walks. Ynoa allowed seven runs and seven hits in 4 2/3 innings, struck out six and walked none.

UP NEXT

The Braves hadn't announced a starter for Sunday's series wrapup. RHP Joe Musgrove (11-9, 3.15 ERA) will start for the Padres in their home finale.