ST. LOUIS — The Washington Nationals' two biggest stars took centre stage on national television Sunday night.

Bryce Harper homered twice against Carlos Martinez, Max Scherzer struck out 12 over seven scoreless innings and the Nationals beat the St. Louis Cardinals 7-2.

"Martinez is really good," Harper said. "He's an All-Star. He's been really good the past couple of years. Throws hard, does things out there that other guys can't do. I was just trying to go out there and put the bat on the ball and hopefully supply the power a little bit and get lucky and get a pitch you can drive, and we were able to do that pretty early on."

Harper also doubled and had four RBIs to pace Washington, which snapped a three-game skid and had lost five of seven.

Scherzer handled the rest.

"It was a night were I came out early and came out sharp and Harp came out with some huge home runs and really put us ahead," Scherzer said.

The Cardinals had won four straight and six of seven overall, including series victories against the Arizona Diamondbacks and Nationals.

Scherzer (10-5), who grew up in the St. Louis area and pitched at the University of Missouri, allowed two hits and two walks while lowering his major league-leading ERA to 1.94. Scherzer's double-digit strikeout performance was his 10th this season and 59th of his career.

"That's why he's an All-Star," Harper said. "That's why he's Max Scherzer. He's one of the best in the league, if not the best. If there's a guy you want on the mound every fifth day, it's him. He's got his plan, he's got his mentality and he does things for this club that he needs to do put us up to that next level. That's why he is who he is and he's fun to watch."

Martinez (6-7) entered the game ranked fourth in the NL in ERA but allowed five runs in five innings. The right-hander had allowed five earned runs over his previous four starts combined.

"It was two innings really," Cardinals manager Mike Matheny said. "It was a slider that didn't get in on Harper and then a changeup that he stayed back on."

The Nationals, who scored two runs over the first two games of the series, scored twice in the first inning, with Brian Goodwin leading off with a ground-rule double and scoring on Harper's 19th home run of the season.

Harper made it 4-0 in the third, driving an 0-2 changeup below the strike zone into the Cardinals' bullpen. Daniel Murphy followed with a walk, and Anthony Rendon smacked an RBI double to the left-centre wall to make it 5-0.

Wilmer Difo and Goodwin added sacrifice flies in the eighth to push Washington's lead to 7-0.

Tommy Pham's two-run homer in the eighth, his 10th of the season, off reliever Enny Romero got the Cardinals on the scoreboard.

STREAK OVER

Cardinals catcher Yadier Molina's 16-game hit streak, which tied his career long, came to an end with an 0-for-4 performance.

TRANSACTIONS

The Cardinals announced two trades Sunday, sending international cap space to the Red Sox for minor league infielders Stanley Espinal and Imeldo Diaz and to the Blue Jays for minor league outfielder Lane Thomas.

TRAINER'S ROOM

Cardinals: LHP Kevin Siegrist (cervical spine sprain) threw off flat ground Saturday.

UP NEXT

Nationals: RHP Stephen Strasburg (9-2, 3.51 ERA) opens a three-game home series against the Mets on Monday night. He is 8-4 with a 2.69 ERA in 14 career starts against the Mets.

Cardinals: RHP Adam Wainwright (8-5, 5.17 ERA) begins a four-game series against the visiting Marlins on Monday night. He is 5-1 with a 2.64 ERA in eight home starts this season.

___

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