Stephen Strasburg matched his season-high with 11 strikeouts and Bryce Harper tied a career-high with five walks as the Washington Nationals beat the Miami Marlins 4-2 Tuesday night.

Anthony Rendon drove in two runs for the Nationals (77-75), who entered Tuesday's game 7 ½ games behind the NL East-leading Atlanta Braves and 7 games back in the race for the final wild card spot.

More Images
Washington Nationals' Trea Turner, right, steals second base as Miami Marlins shortstop JT Riddle attempts the tag during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Stephen Strasburg matched his season-high with 11 strikeouts and Bryce Harper tied a career-high with five walks as the Washington Nationals beat the Miami Marlins 4-2 Tuesday night.

Washington Nationals relief pitcher Sean Doolittle, right, and catcher Matt Wieters congratulate each other after the Nationals defeated the Miami Marlins 4-2 in a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Sean Doolittle pitched a perfect ninth for his 25th save in 26 opportunities.

Washington Nationals shortstop Trea Turner throws to first to put out Miami Marlins' Austin Dean during the ninth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. The Nationals defeated the Marlins 4-2. (AP PhotoWilfredo Lee)

O'Brien's solo homer off Strasburg cut the Marlins' deficit to 2-1.

Washington Nationals' Trea Turner (7) scores on a single by Anthony Rendon as Miami Marlins catcher J.T. Realmuto waits for the throw during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Sandy Alcantara pitched four innings for the Marlins and allowed six hits, six walks, and three runs.

Washington Nationals' Trea Turner is hit by a pitch as Miami Marlins catcher J.T. Realmuto looks on during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Marlins: RHP Jeff Brigham (0-2, 7.36) will take the mound on Thursday when Miami begins the final home series of the season, a four-game set against Cincinnati.

Washington Nationals manager Dave Martinez, left, and Paul Lessard, right, athletic training director, escort Trea Turner to first base after Turner was hit by a pitch during the sixth inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals manager Dave Martinez, left, and Paul Lessard, right, athletic training director, escort Trea Turner to first base after Turner was hit by a pitch during the sixth inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Miami Marlins' J.T. Realmuto gets a base hit scoring JT Riddle during the fifth inning of a baseball game against the Washington Nationals, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Miami Marlins' J.T. Realmuto gets a base hit scoring JT Riddle during the fifth inning of a baseball game against the Washington Nationals, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Wilmer Difo, right, is tagged out by Miami Marlins shortstop JT Riddle as he attempted to steal second base during the third inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Wilmer Difo, right, is tagged out by Miami Marlins shortstop JT Riddle as he attempted to steal second base during the third inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Bryce Harper, foreground, prepares to bat against Miami Marlins starting pitcher Sandy Alcantara, rear, during the first inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Bryce Harper, foreground, prepares to bat against Miami Marlins starting pitcher Sandy Alcantara, rear, during the first inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Anthony Rendon (6) is congratulated by first base coach Tim Bogar (24) after Rendon got a base hit during the first inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Anthony Rendon (6) is congratulated by first base coach Tim Bogar (24) after Rendon got a base hit during the first inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Strasburg (9-7) pitched six innings and allowed two runs and five hits with two walks. At one point, he struck out six consecutive batters.

Washington Nationals' Trea Turner, right, steals second base as Miami Marlins shortstop JT Riddle attempts the tag during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Trea Turner, right, steals second base as Miami Marlins shortstop JT Riddle attempts the tag during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Sean Doolittle pitched a perfect ninth for his 25th save in 26 opportunities.

Peter O'Brien hit his third home run of the season and J.T. Realmuto had two hits and knocked in a run for the Marlins.

Adam Eaton and Trea Turner had consecutive RBI singles in the second inning to give the Nationals an early lead.

Washington Nationals relief pitcher Sean Doolittle, right, and catcher Matt Wieters congratulate each other after the Nationals defeated the Miami Marlins 4-2 in a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals relief pitcher Sean Doolittle, right, and catcher Matt Wieters congratulate each other after the Nationals defeated the Miami Marlins 4-2 in a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

O'Brien's solo homer off Strasburg cut the Marlins' deficit to 2-1.

Rendon's sacrifice fly pushed the lead to 3-1, but Realmuto pulled Miami within 3-2 with a base hit in the fifth.

Rendon's single in the sixth pushed Washington's advantage to 4-2.

Washington Nationals shortstop Trea Turner throws to first to put out Miami Marlins' Austin Dean during the ninth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. The Nationals defeated the Marlins 4-2. (AP PhotoWilfredo Lee)

Washington Nationals shortstop Trea Turner throws to first to put out Miami Marlins' Austin Dean during the ninth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. The Nationals defeated the Marlins 4-2. (AP PhotoWilfredo Lee)

Sandy Alcantara pitched four innings for the Marlins and allowed six hits, six walks, and three runs.

UP NEXT

Nationals: RHP Max Scherzer (17-7, 2.53 ERA) will begin a four-game series against the New York Mets on Thursday.

Washington Nationals' Trea Turner (7) scores on a single by Anthony Rendon as Miami Marlins catcher J.T. Realmuto waits for the throw during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Trea Turner (7) scores on a single by Anthony Rendon as Miami Marlins catcher J.T. Realmuto waits for the throw during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Marlins: RHP Jeff Brigham (0-2, 7.36) will take the mound on Thursday when Miami begins the final home series of the season, a four-game set against Cincinnati.

Washington Nationals' Trea Turner is hit by a pitch as Miami Marlins catcher J.T. Realmuto looks on during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Trea Turner is hit by a pitch as Miami Marlins catcher J.T. Realmuto looks on during the sixth inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals manager Dave Martinez, left, and Paul Lessard, right, athletic training director, escort Trea Turner to first base after Turner was hit by a pitch during the sixth inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals manager Dave Martinez, left, and Paul Lessard, right, athletic training director, escort Trea Turner to first base after Turner was hit by a pitch during the sixth inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Miami Marlins' J.T. Realmuto gets a base hit scoring JT Riddle during the fifth inning of a baseball game against the Washington Nationals, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Miami Marlins' J.T. Realmuto gets a base hit scoring JT Riddle during the fifth inning of a baseball game against the Washington Nationals, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Wilmer Difo, right, is tagged out by Miami Marlins shortstop JT Riddle as he attempted to steal second base during the third inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Wilmer Difo, right, is tagged out by Miami Marlins shortstop JT Riddle as he attempted to steal second base during the third inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Bryce Harper, foreground, prepares to bat against Miami Marlins starting pitcher Sandy Alcantara, rear, during the first inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Bryce Harper, foreground, prepares to bat against Miami Marlins starting pitcher Sandy Alcantara, rear, during the first inning of a baseball game, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Anthony Rendon (6) is congratulated by first base coach Tim Bogar (24) after Rendon got a base hit during the first inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)

Washington Nationals' Anthony Rendon (6) is congratulated by first base coach Tim Bogar (24) after Rendon got a base hit during the first inning of a baseball game against the Miami Marlins, Tuesday, Sept. 18, 2018, in Miami. (AP PhotoWilfredo Lee)