A defensive error by the Phillies allowed Michael A. Taylor to slide home for an inside-the-park grand slam Friday night. (Nick Wass/Associated Press)

The gap between the Washington Nationals and the Philadelphia Phillies, nearly three dozen games in the standings, can be traced to any number of disparities. On Friday night, the difference in the Nationals’ 11-10 victory at Nationals Park was the center fielders.

The youthful Phillies, who hold the worst record in baseball, already had shifted into meltdown mode, helping Washington load the bases with a couple of walks and a couple of fielding gaffes, when Nationals center fielder Michael A. Taylor clobbered a line drive to center field off right-hander Jake Thompson. Odubel Herrera, a considerable talent prone to strange blunders, was out there for the Phillies. He should have made a somewhat routine catch.

Instead, he committed the cardinal sin of outfielding, taking his first step — and a few more — in before realizing he made a grave mistake. The laser already was descending when he recognized his gaffe. He had a split second to hit the brakes, gather himself and jump for it. He landed with his glove empty as the ball bounced to the wall.

“Soon as it went over his head,” Taylor said, “I was thinking four right there.”

Taylor raced around the bases, his sprint galvanizing the crowd as the lackadaisical Herrera retrieved the baseball. He approached home as the Phillies completed their relay, with the throw beating him on a hop. But catcher Jorge Alfaro couldn’t handle it up the line as Taylor slid around him and passed the plate. He went back to touch it to complete a 15.04-second dash and the second inside-the-park grand slam in franchise history.

An outfielder named Bombo Rivera hit the franchise’s first for the Montreal Expos in 1976. Taylor’s marked the first such grand slam in the majors since the Phillies’ Aaron Altherr recorded one Sept. 25, 2015 — on a ball hit to Taylor at Nationals Park.

“Oh, really?” Taylor said when informed of the coincidence. “Feels better to be on this side of it.”

The grand slam also came two years to the day that Taylor hit a Little League inside-the-park grand slam — a single that New York Mets outfielder Yoenis Cespedes mishandled for a three-base error.

Friday’s was Taylor’s 15th home run this season and one of his four hits. He fell a double short of the cycle, tallied a career-high five RBI and saved a run with a throw home from center field — an apt all-around display for a five-tool talent finally capitalizing on a chance to play everyday.

“What a game by Mikey,” Nationals right-hander Max Scherzer said. “Just did everything tonight to win the ballgame.”

The Nationals (87-54) added a run in the fourth inning, three more in the sixth — highlighted by Trea Turner’s first homer since his return from injury — and another in the eighth as they notched their 21st game with 10-plus runs this season, the most in baseball. The offensive onslaught was enough to withstand the Phillies’ three three-run home runs.

“I don’t think I’ve ever won a game when the opposition hits three three-run homers,” Nationals Manager Dusty Baker said.

The first came against Scherzer in an unusual first inning. The next two were off Nationals relievers — first Oliver Perez, then Shawn Kelley, who exited the ninth inning without securing an out after Maikel Franco pulled Philadelphia (53-88) within a run. Franco’s blast was the 12th home run Kelley has allowed in 23⅔ innings and forced the Nationals to go to closer Sean Doolittle, who retired the three hitters he faced for his 17th save with Washington.

The result stretched the Nationals’ winning streak to five games. It’s their sixth of at least that many this season. They haven’t had any losing streaks longer than four games, a ceiling they have reached twice — and a fact that has them on the doorstop of a division title. The Nationals reported to work Friday with their magic number to clinch the National League East at four. The imminence, already increasingly difficult to overlook with each victory, was impossible to ignore when they walked into their clubhouse.

The room’s dark blue carpeting was covered by a beige layer, held down on at the edges with blue painter’s tape. The change brightened the space. Above each locker and television hung plastic sheets, ready for unfurling. The room, which hasn’t hosted a division-clinching bash since 2012, was alcohol-proof. The celebration will have to wait at least until Sunday because the Miami Marlins’ win Friday kept the magic number at three.

Making his first start since taking a line drive off his left calf last Saturday, Scherzer began his night in downright strange fashion. After getting Cesar Hernandez to pop out to start the game, Scherzer issued consecutive walks to Herrera and Rhys Hoskins. The second was on four pitches.

Nick Williams then clubbed a home run to give Philadelphia a 3-0 lead. Scherzer later walked Hyun Soo Kim with two outs, giving him three walks in an inning for the second time in a Nationals uniform. The first was June 24, 2016, against the Milwaukee Brewers.

“You’ve got to let some frustration out,” Scherzer said, “so I definitely threw my glove pretty good.”

After venting, Scherzer regrouped to allow just one more run across his six innings. He departed at 104 pitches with seven strikeouts. He didn’t issue a walk after the first inning.

But Perez instantly floundered in relief, allowing four hits, including a three-run home run to the scorching Hopkins, without recording an out. Matt Albers was summoned to pull the Nationals from the wreckage before their six-run lead evaporated.

He completed the assignment in part because Taylor threw out Williams at home with a strike from center field. It was Taylor’s eighth outfield assist and another in a growing catalogue of elite defensive plays. Fittingly, his RBI triple in the eighth inning, a throwaway run at the time, proved the game-winning hit on a night when the center fielders were the difference.