MIAMI — Max Scherzer's bid for the third no-hitter of his big league career ended with one out in the eighth inning, and he then gave up two unearned runs as the Miami Marlins rallied to beat the Washington Nationals 2-1 Wednesday.

After backup catcher A.J. Ellis reached on an infield single for Miami's first hit, an error by first baseman Adam Lind and a hit batter loaded the bases with two outs. Scherzer threw a wild pitch that scored the tying run, and Giancarlo Stanton lined an RBI single — the Marlins' only other hit — to put them ahead.

Scherzer (8-5) threw no-hitters against the Pirates and Mets in 2015, and he seemed on his way to another when he began the eighth inning with a 1-0 lead.

He retired 18 in a row before Ellis hit a chopper that bounced in front of the plate and glanced off the tip of Scherzer's glove as he reached overhead for it. The ball rolled to shortstop Trea Turner, who failed in his attempt to make a barehanded pickup and rush a throw.

Official scorer Ron Jernick immediately ruled the play a hit, and Scherzer knew it. He picked up the ball and angrily flung it to the dugout — not as a souvenir.

Washington totalled five hits against Dan Straily and three relievers. Kyle Barraclough (3-1) pitched the eighth, and A.J. Ramos worked around a two-out single in the ninth for his 10th save.

Scherzer threw a season-high 121 pitches and had 11 strikeouts, reaching double figures for the sixth game in a row, the team's longest such streak such the franchise moved to Washington for the 2005 season.

He lowered his ERA to 2.08, best in the NL. He also leads the league with 145 strikeouts.

The other no-hitter in the majors this year was achieved on the same mound by Miami's Edinson Volquez against Arizona on June 3.

The crowd of 22,659 for the 12:10 p.m. start included thousands of youngsters on camp day, and they gave the game a scream-filled soundtrack.

The score was 0-0 until Washington's Ryan Raburn hit his first homer of the year in the fifth. Raburn was a late replacement for outfielder Michael A. Taylor, who was scratched because he wasn't feeling well.

That was the only run allowed by Straily, who went six innings.

Scherzer walked Christian Yelich with two out in the first and hit Derek Dietrich with a pitch with one out in the second. That was Miami's last baserunner until the eighth.

INJURED BROADCASTER

Marlins Spanish-language announcer Rafael "Felo" Ramirez is back in Miami following a lengthy hospital stay in Philadelphia after he fell stepping off the team bus. Ramirez, who has called games since the team's inaugural 1993 season, turns 94 Thursday.

TRAINER'S ROOM

Nationals: 3B Anthony Rendon (sore neck) was back in the lineup after missing two games.

UP NEXT

Nationals: The NL East-leading Nationals went 5-2 on a two-city trip. RHP Stephen Strasburg (8-2, 3.28) is scheduled to start Friday when they return home to face Cincinnati and former Marlins prospect Luis Castillo, who will make his major league debut.

Marlins: LHP Jeff Locke (0-2, 4.58) is scheduled to start Thursday to open a four-game series against the Cubs and RHP Jake Arrieta (6-5, 4.64), who has a couple of no-hitters himself.

___

More AP baseball: https://apnews.com/tag/MLBbaseball