NEW YORK  — Juan Soto is barely old enough to be in college, let alone lighting it up at Yankee Stadium.

The teenage rookie homered twice and drove in four runs, becoming the youngest player in 29 years to go deep in a regular-season game in the Bronx, and the Washington Nationals beat New York 5-4 on Wednesday night:

After getting a game off Tuesday, his first in three-plus weeks as a major leaguer, a refreshed Soto showed exactly why he was rated one of baseball’s best prospects.

“I’ll start off by saying, Soto is really good. How’s that?” Nationals manager Dave Martinez said. “He understands the game. He understands good at-bats.”

With family from New York in the crowd of 45,030, the 19-year-old outfielder from the Dominican Republic lofted a three-run homer into the left-field corner off Sonny Gray in the fourth inning to give Washington — shut out in its previous two games — a 4-3 lead.

Soto then launched a titanic shot in the seventh against Chasen Shreve (2-1), putting the Nationals back in front 5-4.

Projected at 436 feet, the drive soared to the back of a standing-room terrace above and beyond the Yankees‘ bullpen in right-center. It also ended a 23-inning scoreless streak for New York relievers and made Soto (19 years, 231 days old) the youngest player in Nationals history to have a multihomer game.

“Strong kid,” Yankees manager Aaron Boone said.

Hall of Famer Ken Griffey Jr. was 19 years, 190 days old when he homered (also twice) for Seattle at old Yankee Stadium on May 30, 1989. Andruw Jones was 19 as well when he hit two home runs there for Atlanta in Game 1 of the 1996 World Series.

“It feels pretty good. Two good outfielders,” Soto said. “I like that.”

Called up from Double-A Harrisburg on May 20, Soto is batting .344 with five homers and 12 RBIs.

“He has power. Super young. Good hitter,” Shreve said. “I didn’t do my job. We lost the game because of it.”

New York got a long home run from its own impressive rookie, 21-year-old Gleyber Torres, to tie it at 4 in the fifth. Greg Bird also hit a solo homer and Giancarlo Stanton had three hits for the Yankees, including an RBI single.

Adam Eaton and Matt Adams had three hits apiece for the Nationals, who made five outs on the bases but still won to split the two-game interleague series between World Series contenders. The teams meet again next Monday in Washington to complete a May 15 matchup suspended with the score tied 3-all in the sixth inning and to make up a May 16 rainout.

Justin Miller (4-0) struck out four in 1 2/3 innings on his 31st birthday.

“Pretty nice,” Miller said. “I guess I’m just in the weeds — I keep snaking wins.”

Sammy Solis knocked down Brett Gardner’s comebacker with a runner on third for the final out of the seventh. Ryan Madson pitched out of trouble in the eighth and Sean Doolittle worked a perfect ninth for his 17th save in 18 chances.

New York lost for only the fifth time in its last 23 home games.

Nationals rookie Erick Fedde allowed four runs and six hits in five innings. Pitching in place of injured ace Stephen Strasburg, the right-hander was recalled from Triple-A Syracuse before the game to make his fifth major league start and second this season.

MORE NATIONALS NEWS: