SAN DIEGO — The white flag was seemingly all but hoisted as Daniel Camarena grabbed a bat with the bases loaded in a six-run game in the fourth inning Thursday night. Yu Darvish had already walked off the mound with a miserable three innings, Camerena had already given up a homer himself and the priorities were clear as the reliever stepped into the box to face three-time Cy Young-winner Max Scherzer.

Preserve the bullpen.

The Cathedral Catholic product had grander ideas.

The reliever’s historic grand slam got Darvish off the hook for one of the worst starts of his career and Trent Grisham capped an improbable comeback with a walk-off single in a 9-8 Padres win over the Washington Nationals in front of 29,434 at Petco Park.

Tommy Pham had tied the game with a sixth-inning double and Grisham’s ninth-inning single allowed the Padres to thoroughly enjoy a memorable homecoming.

Entering the game with the Padres trailing 6-0, Camerena promptly allowed a single to Alcides Escobar and Trea Turner’s second homer of the game.

The awakening started with Fernando Tatis Jr.'s solo homer to left-center, his 28th of the season.

Scherzer then hit Manny Machado with one out, allowed a single to Grisham and hit Eric Hosmer to load the bases. After Wil Myers’ walk pushed across the Padres’ second run, Victor Caratini struck out and Camarena walked to the batter’s box even with Jurickson Profar still sitting on the bench.

Again, the priority was clear a day after Chris Paddack lasted just two-plus innings in a lopsided loss to the Nationals: Preserve the bullpen.

After all, the 28-year-old Camarena had just 31 plate appearances over his eight-year stay in the minors, just five hits and no extra-base hits.

Didn’t matter much even after Scherzer got ahead with two strikes.

After taking a change-up in the dirt, the left-handed-hitting Camarena offered at a 97 mph four-seamer below the zone and yanked it well out to right.

The tale of the tape — a 107 mph drive for a 416-foot homer — was almost as impressive as the brush with history.

No pitcher in the modern era (since 1900) had ever hit a grand slam for his first MLB hit. The only one to do it before that was the Phillies’ Bill Duggleby on April 21 in … 1898.

Naturally, no other Padre had ever mashed a grand slam for his first big-league hit.

Camarena signed a minor league deal with the Padres before the 2020 season, was on the taxi squad a few times last year and didn’t make his MLB debut until allowing three runs in 2 2/3 innings in relief on June 19, the culmination of a decade-long journey that began when the Yankees selected him in the 20th round out of Cathedral Catholic in 2011.

Trials and tribulations piled up along the way, beginning with missing all of 2015 following a procedure to remove bone spurs from his left elbow and most significantly his father dying unexpectedly in February 2019.

Camerena’s older brother, Louie, and his mother, Consuelo, were among the local friends and family to witness the grand moment.

“It’s powerful,” the 40-year-old Louie Camarena said. “… Here we are at home, not too far from where Dad is. … This is the stuff that Dad and all of us dreamt of and talked about, so to do it here, it’s just truly remarkable. It’s a testament to his grind. Perseverance, all the hard work. We’ve never lost faith. … Our tribe never lost doubt. We always believed. In some ways, we believe we’re where we’re supposed to be, quite frankly. It feels just right.”

Camarena followed his grand slam with a scoreless fifth inning before Craig Stammen continued the run of shutout innings from the Padres’ bullpen.

The Padres, of course, weren’t done in the fourth after Camarena’s grand slam, but Scherzer certainly was after Pham followed with a double to right, cashed in by a Tatis single that fell in between three Nationals in right field for Scherzer’s career-worst seventh earned run over 3 2/3 innings.

Darvish was just as bad in his last start before representing the Padres in the All-Star Game, allowing six earned runs on eight hits and no walks over three innings.

The six earned runs for Darvish were a season-high — and one shy of a career high — and the most he’d allowed in a game since allowing six in 5 1/3 innings on Aug. 21, 2019.

The three-inning start was the shortest of Darvish’s career.

Darvish was in a hole almost immediately, serving up the first of Turner’s two homers on a middle-in, 94 mph that the one-time Padres prospect yanked out to left as the second batter of the game.

It was third straight homer that Darvish had yielded via his four-seamer following both long balls allowed Saturday in Philadelphia.

Starlin Castro added a two-run double before Darvish could escape a first inning in which he allowed four hits. After a one-two-three second, the first three hitters reached in the third, with Josh Bell doubling in a run, Castro adding a sacrifice fly to center and Josh Harrison opening up a 6-0 lead with a single to center.

Darvish ended the third inning with his second strikeout of the game and walked off the mound as Camarena began to warm up in the bullpen.

After Tatis’ fourth-inning single, he swiped second for his NL-leading 20th steal to make him — at 22 years and 187 days old — the youngest player to ever log a 20-20 season before the All-Star break.

Caratini was hit on his right throwing hand by a foul ball and later exited for pinch-hitter Webster Rivas. There was no immediate update from the Padres on his condition.

(Union-Tribune videographer Annie Heilbrunn contributed to this report.)

©2021 The San Diego Union-Tribune. Visit Distributed by Tribune Content Agency, LLC.

Copyright 2021 Tribune Content Agency.