Zack Greinke delivers in his eight-inning performance of shutout ball at Nationals Park. (Katherine Frey/The Washington Post)

The baseball calendar, on infrequent occasions, allows for enchanting, captivating pitching matchups such as the one at Nationals Park on Sunday. Depending on your point of view, either of the starters was the best in the National League this season. Los Angeles Dodgers starter Zack Greinke, who hadn’t allowed a run in a month, possessed the best ERA in baseball. Washington Nationals starter Max Scherzer, who hadn’t issued a walk in a month, was second.

The showdown of NL Cy Young front-runners on a steamy summer afternoon went Greinke’s way. While Scherzer pitched well, he made one small but costly mistake over six innings in a 5-0 loss. The game was still within reach in the ninth, but Blake Treinen turned a one-run deficit into a mess. Greinke, meanwhile, struck out 11 Nationals over eight scoreless innings.

“I love facing the best,” Scherzer said. “Right now, he’s the best.”

The loss, coupled with a New York Mets victory, makes the Nationals-Mets series beginning Monday more critical. The Nationals hold a two-game division lead.

Greinke’s marvelous outing extended his scoreless streak to 43 2/3 innings, the longest by anyone since Orel Hershiser’s record 59 in 1988.

“I stopped thinking about [big matchups] a long time ago because every time I try to do more, the results will be worse,” Greinke said.

A day after the Nationals ran into the Clayton Kershaw buzz saw, Greinke fooled them with his mix and command of pitches that moved every way possible. The Nationals managed only four base runners: three singles and a walk by Bryce Harper. Michael A. Taylor’s third-inning single snapped Greinke’s streak of 28 straight batters retired, essentially a perfect game that stretched back to his last start before the all-star break.

“Giving up only one run is good, but good is not good enough when you’re going up against Greinke and what he’s doing right now,” Scherzer said. “He just completely shut us down. He was throwing the ball outstanding, and I wasn’t able to match him.”

But Harper felt Greinke was helped by a generous strike zone and, after his seventh-inning whiff, yelled at home plate umpire Bill Miller as he walked back to the dugout.

“For me, I don’t think [Greinke] was very tough,” Harper said. “He’s a great pitcher. He does what he does, but when you’re getting six inches off the plate, it’s pretty tough to face him. Of course, he has his change-up and his sinker and he elevates. He’s a good pitcher. He’s doing what he’s doing to help that team over there, but I don’t want to give him too much credit because I’ve got to face him again.”

In a pitching matchup of this caliber, any small mistake could mean the difference.

Andre Ethier poked an 0-2 change-up into left field to start the fourth inning and aggressively took second when left fielder Matt den Dekker couldn’t cleanly field the ball. Sensing how close of a game it could be, the Dodgers had their five-hole, power-hitting, all-star catcher Yasmani Grandal bunt.

The sacrifice allowed Ethier to move to third, putting pressure on Scherzer and the Nationals. After striking out Yasiel Puig on a 97-mph fastball, Scherzer bounced a cutter in the dirt to Alberto Callaspo. Catcher Wilson Ramos chased down the ball and threw wide of Scherzer as Ethier slid in safely to give the Dodgers a 1-0 lead.

“I missed with it, and that ended up costing me a crucial run at that point in the game,” Scherzer said. “It just something that I’m trying to execute that pitch in, and I yanked it in.”

Aside from that sequence, Scherzer did well. He asked for the team to wear white uniforms instead of the Sunday reds and wore high socks to help with the 100-degree heat index. He struck out eight over six innings and gave the Nationals a chance to win. He pitched out of a bases-loaded jam in the first inning but snapped his streak of 39 2/3 consecutive innings without a walk with a free pass to Grandal. He got ahead of hitters, but four of the seven hits he allowed were with two strikes. With the Nationals’ depleted lineup going against a dominant pitcher, Scherzer had little room for error.

“We’ve got to do our job and help him out,” first baseman Clint Robinson said about Scherzer, who has allowed two earned runs or fewer in five of his eight losses. “We haven’t done that in the games he’s lost, and we have to get better at that.”

Because Scherzer’s pitch count was at 98 on a hot day and the Nationals needed offense, Manager Matt Williams pinch-hit for Scherzer in the sixth and put Felipe Rivero on the mound in the seventh. The Nationals escaped Rivero’s bases-loaded jam when he struck out Ethier, and Aaron Barrett then came in to fan A.J. Ellis.

Casey Janssen was perfect in the eighth inning before Treinen put any chance of a comeback out of reach. Entering the game, left-handed batters were hitting .329 against Treinen, yet Williams turned to him despite the presence of Matt Thornton and Sammy Solis.

“[Treinen] hasn’t pitched,” Williams said. “He’s a guy that we can go to. He’s our long guy. If we tie that game, he’s still in the game. If he gets through that inning, easy. . . . We’re down to our long guy there.”

Treinen faced seven batters, four of them left-handers. With runners on second and third and one out, Williams called for Treinen to intentionally walk left-handed hitting Adrian Gonzalez to load the bases so he could face the left-handed Ethier, who singled in a run. Ellis drove in another run with a single, and Puig, who had struck out in his four previous at-bats, hit a groundball under Yunel Escobar’s glove for a single that gave the Dodgers a five-run lead.

“Just didn’t make pitches when I needed to,” Treinen said. “Balls found holes. Didn’t put guys away when I was up in the count.”