It was always him and his dad. That’s how Bryce Harper remembers it. He would wait for Ron Harper to come home from his shift as an ironworker, a 5-year-old bundle of energy pleading for a pitcher. Out they would head, either into the family garage or to one of the dusty Las Vegas diamonds near their home. “I’d just swing and try to hit the ball as hard as I could,” the son recalled.

One day when Bryce was 10, another of the batting sessions he never tired of had just ended. He turned to his father and told him if he ever made the Home Run Derby, he wanted him to pitch.

Monday night, they stood about 50 feet apart in the middle of a packed major league stadium. Behind a screen in front of Citi Field’s mound was Ron, decked out in an orange National League jersey — No. 3, his old high school number. At the plate was Bryce, who had grown up and become a 20-year-old Washington Nationals superstar. The son had made it to the Home Run Derby, and his dad had come to pitch to him.

“I wouldn’t trade it for nothing,” Ron Harper said. “It’s a dream come true.”

After Bryce popped up his last pitch of the first round, he met his dad in the field and hugged him. The final result seemed not to matter so much anymore, but both Harper men had come to win — “that’s my big thing,” Ron had said. They almost did.

See where Harper hit each of his 24 home runs.

Harper advanced to the final round of the Home Run Derby and, with eight homers, applied pressure on Cuban slugger Yoenis Cespedes of the Oakland Athletics. Cespedes responded, launching his ninth home run after only five of his 10 outs had expired. He flipped his bat before his homer had landed on the other side of a Chevy pickup beyond the center field fence.

“What a great competitor he is,” Harper said. “I can’t wait until I’m 23.”

Harper may not have won, but he outlasted Prince Fielder, Robinson Cano, Chris Davis and three other top sluggers. Like Cano, he got to hit pitches thrown by his dad.

“Growing up, you always see the guys hitting homers,” Harper said. “I always hit well off my dad. I’m so thankful and blessed he was able to do that. It was a special opportunity for me to do this. I had a blast.”

For most hitters, ideal batting-practice pitches are straight fastballs. Ron, though, strayed from that norm: He threw his son cutters, pitches that curled slightly toward the left-handed batter’s box. He had always thrown Bryce pitches on the outside half of the plate, mimicking the way opposing pitchers stayed away from him.

“For some reason, because I’ve always been throwing on the outer half, it cuts now,” Ron said. “I used to throw a straight four-seam fastball.”

Bryce blasted eight home runs in his first round, including a 471-foot smash on to the faux bridge beyond the right field fence, the second-longest homer of the night. He crushed the first pitch he swung at deep to right. He watched several low pitches float past as Ron found a rhythm. Bryce vowed to use the whole field, and he drilled one homer to left-center, an “oppo boppo” in his vernacular.

“I know he’s swinging well when he goes the other way,” Ron said.

In the final four, Bryce joined Michael Cuddyer, Davis and Cespedes, who belted 17 homers in the first round. He creamed homers on five straight swings at one point and finished with another eight home runs, enough to make the finals by one over Cuddyer.

“I just kind of took myself back to Vegas High School, where I threw to him the most,” Ron said. “It’s just a game. Let’s just have fun. He’s a great kid. I love watching him swing. I got to enjoy the moment.”

Bryce approached the derby with his typical bravado. He batted without a hat, revealing a spiky haircut that made it seem as if sea urchins had colonized the top of his head. Under Armour specially made a pair of spikes for him, just for the derby, a metallic kaleidoscope on his feet, replete with a subtle outline of the New York skyline. “Pretty sweet,” he said.

By the end, the competition became a matter of attrition. By one count, Ron threw 120 pitches. One of them slipped and hit Bryce in the back foot; he could not remember ever being hit by his dad in BP. In the final round, Bryce switched to a lighter bat.

“Probably rather lay some rebar,” Ron said, laughing.

Family, more than anything, has sustained Bryce during his rise. He has “Pops” tattooed on his right wrist. His brother, Bryan, a lefty reliever at the Nationals’ Class A affiliate in Hagerstown, played a 10:35 a.m. game and made it to New York in time to watch from the field. Their mother, Sheri, sat in the crowd.

“I wasn’t thinking there’s a million people in the stands,” Bryce said. “I was thinking, ‘My family is here.’ ”

Ron cherished watching Bryce swing at his pitches most. He also soaked in the feeling of playing with the big leaguers his son calls colleagues and competitors.

“I shagged on a big league field,” Ron said. “With [Andrew] McCutchen and David Wright and [Joey] Votto. I laughed with all these guys. Cliff Lee is sitting right there. It’s really amazing.”

After the final round ended, Bryce walked toward the screen to meet his dad. They hugged. “Thank you for the opportunity to do this with you, kid,” Ron told his son. “I love you.”

Bryce smacked him on the shoulder. It was, again, him and his dad.