Updated

Max Scherzer struck out 20 batters, matching the major league record for a nine-inning game as he pitched the Washington Nationals past the Detroit Tigers 3-2 on Wednesday night.

Scherzer had a chance to break the mark when James McCann stepped to the plate with two outs in the ninth inning. McCann, who whiffed his previous three times up, grounded to third for the final out.

The breathtaking performance came in Scherzer's first outing against the Tigers, his former team. The right-hander, who pitched two no-hitters last season and struck out 17 in the second one, joined Roger Clemens (twice), Kerry Wood and Randy Johnson as the only big league pitchers to compile 20 strikeouts in nine innings.

Johnson accomplished his feat in nine innings during a game that went 11. Tom Cheney holds the major league record with 21 strikeouts when he pitched all 16 innings for the Washington Senators during a game against Baltimore in 1962.

"I think it was about the eighth inning when I punched out somebody and they said that was 18, that was the first time I heard the number, so I knew I had a shot at going out for the ninth and 20," Scherzer said.

After striking out the side in the eighth, all on called strikes, the 2013 AL Cy Young Award winner was up to 18. He gave up a leadoff homer to J.D. Martinez in the ninth, then blew a 97 mph fastball by slugger Miguel Cabrera for No. 19.

Victor Martinez singled before Scherzer got another All-Star bopper, Justin Upton, swinging at a low slider to tie the record.

That came one pitch after Upton's foul pop landed just beyond the reach of first baseman Ryan Zimmerman and in a camera well.

Scherzer pounded his fist in excitement and then went back to work. McCann grounded an 0-1 pitch to third baseman Anthony Rendon, who threw to second for the forceout.