SAN DIEGO — Left-hander MacKenzie Gore pitched five strong innings against his former team, Jeimer Candelario homered and drove in three runs and the Washington Nationals took advantage of San Diego’s bullpen meltdown to beat the staggering Padres 8-3 Sunday to take two of three.

The Nationals blew open a tie game by chasing Seth Lugo (3-4) with two runs in the sixth and then scoring five unearned runs in the seventh, when reliever Tim Hill committed two throwing errors and hit a batter. Lane Thomas hit an RBI single and Candelario a two-run double off Hill before Joey Meneses greeted Brent Honeywell with a two-run double. Meneses had three RBIs.

The Padres, whose $250 million payroll is third highest in baseball, continue to be wildly inconsistent. They won 10-0 at San Francisco on Thursday to avoid a four-game sweep and then routed the Nationals 13-3 on Friday night. But they had only four hits in losing 2-0 Saturday night and looked flat again Sunday. They came into the season with World Series aspirations but have been under .500 since May 12.

Gore (4-6), who went to Washington in the blockbuster trade for Juan Soto on Aug. 2, held the Padres to one run and five hits, struck out nine and walked two. He got off to a great start, setting a Nationals record by striking out the first six batters, including superstars Fernando Tatis Jr. and Soto to end the first and Manny Machado and Xander Bogaerts to open the second.

The Baltimore Banner thanks its sponsors. Become one.

“That’s awesome. You don’t know what the good Lord’s going to do. A year ago I was here,” Gore said. “Really cool.”

The Padres, who had gone 13 straight innings without advancing a runner past second base, broke through in the fifth when Tatis hit a two-out RBI single to tie it at 1. Gore then finished his outing by striking out Soto with runners on the corners to end the threat.

“That probably was my last hitter. I don’t know what the pitch count was,” Gore said. “We made a good enough pitch on 3-2 and got him to chase.”

Gore showed emotion after that strikeout.

“I like him. He talked some junk, and he’s competitive. I’ve never played against him much, but I like him,” he said. “There was some of that going on. It was friendly.”

The Baltimore Banner thanks its sponsors. Become one.

Manager Dave Martinez liked how Gore handled himself facing his old team.

“He was good. Right from the first pitch, I said, ‘OK, we’re going to be OK,’” Martinez said. “He controlled his emotions; he stayed in each at-bat; he threw the ball well. These guys are good. They don’t chase. You’ve got to throw strikes. He came out and gave us five strong innings, and that’s all we needed. Bats came alive, and the guys in the bullpen held us down.”

Mason Thompson walked the bases full with two outs in the sixth before Joe La Sorsa came on and struck out Gary Sanchez.

“I can’t say enough for what Joe did in a big moment right there for us,” Martinez said. “That’s a beautiful thing to have that lefty come out and get a big out for us like that.”

Candelario hit his 10th homer, driving a 2-0 pitch from Lugo deep into the stands in right-center with two outs in the first.

San Diego’s Kim Ha-Seong homered in the seventh, his eighth.