One slice of the future arrived at Nationals Park on Sunday, bundled into a 6-foot-1 pitcher named Josiah Gray. He stopped by Dave Martinez’s office to chat with his new manager. He got to his locker, a whole country away from his old, and slipped on red — a red shirt, a red hat — before throwing with bullpen catcher Octavio Martinez.

He had to loosen his arm after he traveled from Los Angeles, with a stop in Oklahoma City to pick up key belongings. For the past 72 hours, after Gray was traded in a deal that sent Max Scherzer and Trea Turner to the Dodgers, his life had been upended, filled with phone calls and goodbyes, shifting plans and an uncertain future. But on Monday, in a home game against the Philadelphia Phillies, Gray, 23, will make his debut for the Nationals.

A new era will begin around 7:05 p.m. That’s what rides on his first pitch.

“I told him, ‘Just go out there and have fun,’ ” Martinez said Sunday morning, before the Nationals beat the Chicago Cubs, 6-5, when Yadiel Hernandez’s fourth hit of the afternoon was a walk-off homer to left. “And get together with [Tres] Barrera, who’s probably going to catch him [Monday], and go over the game plan. ‘Just you be you.’ He’s had some good numbers, and I’m excited to see him go out there and compete.”

Gray joins a rotation that, for now, includes Patrick Corbin, Joe Ross, Erick Fedde and Paolo Espino. In Sunday’s win, Fedde was dominant aside from two homers by Cubs center fielder Rafael Ortega, who crushed the Nationals all weekend. Between Ortega’s first and second shots, Fedde retired 14 of the 17 batters he faced, ultimately throwing six innings, allowing three runs, striking out eight and walking one.

Ortega then knotted the score at 5 with a two-run bomb off Wander Suero in the eighth. The 30-year-old journeyman was unstoppable, crushing half of his season home run total in a single afternoon. But Washington’s offense, revved early by first baseman Josh Bell, survived on Hernandez’s production: a single, an RBI single, a solo shot in the seventh and another in the ninth. Both homers were to the opposite field. The game-winner was off a 100-mph fastball from Cubs reliever Manuel Rodríguez.

Hernandez, a 33-year-old outfielder getting a shot because Kyle Schwarber and Josh Harrison were dealt at the deadline, is 11 for 20 since the all-star break. He was hot earlier this season, fell into a deep slump and, after stints with Class AAA Rochester, arrived back in time to help the Nationals (49-56) beat the Cubs (51-56) in a battle of stripped-down rosters.

“I’m looking for a fastball — anything hard, whether it’s in, away, down, up,” Hernandez said of his approach to the last at-bat of the series. “... On that particular pitch, I took advantage. I just reacted quickly.”

Gray and catcher Keibert Ruiz form the centerpiece of what the Nationals received for Scherzer and Turner. But Ruiz, 23, will start with Rochester as Gray heads straight for D.C. Part of that was driven by a need for arms, with Scherzer and Jon Lester dealt at the deadline and Stephen Strasburg out for the season after undergoing surgery for thoracic outlet syndrome. Another angle, though, is the club’s eagerness to see what Gray has.

He debuted for the Dodgers on July 20, limiting his major league stats to two appearances (one start), six earned runs and 13 strikeouts in eight innings. He mixes a mid-90s fastball with a slider, a curve and the rare change-up. And he wasn’t a full-time pitcher until 2017, when he decided to stop playing shortstop for Division II Le Moyne College in Syracuse, N.Y.

The next June, he was drafted in the second round by the Cincinnati Reds, who soon traded him in a package to Los Angeles for Yasiel Puig, Matt Kemp and Alex Wood. Gray kept thriving in the minors, posting a 2.87 ERA with the Dodgers’ Class AAA affiliate this season, before the Nationals decided to sell.

Across the past few months, Gray’s innings have been limited by a shoulder impingement. But Martinez said there will be no strict limitations on Gray, who last started July 25. To make room for him on the active roster, the Nationals optioned Tanner Rainey, once a key reliever, to Rochester. It was a surprising choice, especially with so many movable parts, but Martinez wants Rainey to pitch every other day, situation not considered. Rainey has a 7.20 ERA in 25 innings this season.

“He says he feels good,” Martinez said of Rainey, who was slowed in spring training by a muscle strain near his right collarbone, then missed most of July with a stress reaction in his right tibia. “This was based on just how we want to use him and not be able to get him in every other day. I could have put him in [Saturday], of course, but up here we’re trying to compete, we’re trying to win. I don’t just want to throw him into a game.”

Preparation for Gray will be odd because pitching coach Jim Hickey is still away from the team after he tested positive for the coronavirus. Sam Narron, pitching coach for the Nationals’ Class AA affiliate, is filling in. So Gray plans to chat with Hickey on the phone and meet with Narron in person. And Barrera, Washington’s temporary starting catcher, has been regularly lauded for how he handles pitchers.

Bringing Gray into a new situation, in a new park, in a new city of hope-starved fans is no small thing. Mercifully, it arrives just days after Scherzer, Turner, Schwarber, Harrison, Daniel Hudson, Yan Gomes, Brad Hand and Jon Lester skipped town.