Baltimore pulled within four games of Tampa Bay for the third and final AL wild card. The Orioles begin a three-game series Friday at wild-card leader Toronto - and trail the Blue Jays by 5 1/2 games.
Riley Adams and Luke Voit homered for Washington, which is a majors-worst 49-94 and has lost five in a row and seven of eight. The Nationals had only four hits and were 0 for 5 with runners in scoring position.
The Orioles took control with a four-run seventh against Mason Thompson (1-1). After back-to-back singles, Henderson laced an opposite-field hit down the line. Cesar Hernandez, playing left for just the fourth time in his 10-year career, appeared to anticipate the ball caroming off a wall in foul territory, only for it to zip into the corner.
Hernandez then lost his grip on the ball when he tried to throw it back to the infield, allowing Henderson to charge home.
Mateo launched the next pitch into the left field seats to make it 5-2.
Henderson added an RBI double in the eighth. The infielder is hitting .320 with nine RBIs in 14 games since his Aug. 31 callup from Triple-A Norfolk.
Austin Voth (5-2), who pitched parts of five seasons for Washington before he was designated for assignment May 31, worked a scoreless sixth in his first appearance against the Nationals.
Baltimore's Tyler Wells, making his second start since returning from an injured list stint of more than a month, struck out four in four innings and retired 12 of the 14 batters he faced. The two he didn't set down smacked two-out home runs - Adams in the third and Voit in the fourth.
The Orioles took a 1-0 lead in the second on Henderson's RBI grounder.
Washington starter Patrick Corbin allowed one run in six innings while striking out four. The left-hander leads the majors in losses with 18, but is 2-2 with a 3.41 ERA in six starts since Washington skipped his turn in the rotation last month.
Orioles: 2B Rougned Odor (bruised right hand) was out of the lineup against the left-handed Corbin, but was available. Odor has not played since he was hit by a pitch Sunday.
Nationals: DH Nelson Cruz (eye inflammation) was out of the lineup a day after leaving with blurry vision. . Manager Dave Martinez said RHP Cade Cavalli's shoulder inflammation is gone. Cavalli is not expected to pitch in a game again this year. ''If everything goes well, we'll try to get him on the mound (before the end of the season), whether that's a bullpen or if he feels really good, maybe a sim game,'' Martinez said.
Orioles: Baltimore has not announced its rotation plans for Friday's game at Toronto.
Nationals: After Thursday's off day, RHP Josiah Gray (7-9, 5.06 ERA) will start Friday against Miami. Gray has not pitched since yielding four runs in 3 1/3 innings Thursday at St. Louis.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.