Updated

Max Scherzer pitched a no-hitter and came agonizingly close to a perfect game, hitting a batter with two outs in the ninth inning Saturday in the Washington Nationals' 6-0 win over the Pittsburgh Pirates.

Scherzer was masterful in retiring the first 26 hitters. He came within one strike of throwing the 22nd perfect game in major league history since 1900.

Pinch-hitter Jose Tabata fouled off three 2-2 pitches before Scherzer clipped him on the elbow with a breaking ball. Tabata dropped his elbow as the pitch approached, and Scherzer immediately grimaced after plunking him.

Scherzer (8-5) then retired Josh Harrison on a deep fly to left and was swallowed up by jubilant teammates near the mound.

After finishing off his first career no-hitter, the Nationals' ace admitted there was a bit of a letdown when he hit Tabata.

"I mean there is, just because you're so close, one strike away from a perfect game," he said. "But to get a no-hitter in front of these fans, there's nothing better."

The 30-year-old righty struck out 10 in his second straight dominant performance, and was cheered by a crowd of 41,104.

Scherzer got help from his infield in the late innings.

In the eighth, shifted second baseman Danny Espinosa barely threw out Pedro Alvarez from shallow right field to end the inning.

"Man, that was just a great play," Scherzer said.

Leading off the ninth, third baseman Anthony Rendon ran hard to catch a foul pop by Gregory Polanco, and wound up bent over the dugout railing.

In his previous start, Scherzer took a perfect game into the seventh at Milwaukee and finished with a one-hitter and 16 strikeouts. The lone hit was a leadoff single by Carlos Gomez just beyond reach of Rendon, who was playing second base.

Scherzer turned in perhaps the most magnificent consecutive starts in the majors since Johnny Vander Meer pitched back-to-back no-hitters for Cincinnati in 1938.

Scherzer wound up with his third career shutout. He had one in 219 lifetime starts before these two in a row.

Signed to a $210 million, seven-year contract in the offseason after leaving Detroit, the 2013 AL Cy Young winner pitched the second no-hitter in Nationals' history. Jordan Zimmermann threw one against the Marlins last year to end the regular season.

It was the fourth no-hitter in the city's baseball history -- Walter Johnson and Bob Burke threw them for the old Washington Senators.

This was the second no-hitter of the season. San Francisco rookie Chris Heston did it June 9 against the Mets.

Scherzer's gem marked the second major achievement in the big leagues in two days. On Friday night, Alex Rodriguez got his 3,000th career hit for the Yankees.

Scherzer threw 106 pitches, 82 for strikes. He was throwing fastballs in the upper 90s mph and used a wicked slider in lowering his ERA to 1.76.

The Pirates twice hit balls to the warning track in his first time through the order.

Bryce Harper hit his 23rd homer and drove in two runs. He had missed two games after straining his hamstring.

Francisco Liriano (4-6) took the loss.

UP NEXT

Pirates RHP Charlie Morton (5-0, 1.62) has won all of his starts this season. He'll pitch Sunday against Gio Gonzalez (4-4, 4.82).

BLANKED BUCS

This was the sixth no-hitter vs. the Pirates, and the first since Homer Bailey did it for the Reds in 2012.