WASHINGTON (AP) The Washington Nationals have experienced a variety of problems in recent days. Their latest mistake was a bunt that wound up in foul territory down the right field line.

Nationals reliever Aaron Barrett made a wild throw in the sixth inning and the Arizona Diamondbacks quickly broke away, romping 11-4 Wednesday night and handing Washington its fifth loss in six games.

Washington manager Matt Williams said his team needs to snap out of this funk and start playing better. The loss dropped the Nationals two games behind the streaking Mets in the NL East.

More from FoxSports

''We've got a limited number of games left, and we have to play well if we want to go where we want to go,'' Williams said. ''Can (this loss) galvanize? Yeah, we hope so.''

Right fielder Bryce Harper offered a simple solution for his struggling team.

''We've just got to keep battling, keep grinding,'' he said. ''Just got to keep smiling, keep laughing and try to have some fun. We've got a long ways to go.''

Down 11-2 in the ninth, the pitching-rich Nationals resorted to putting utilityman Tyler Moore on the mound. He retired the first batter he faced, Arizona star Paul Goldschmidt, on an RBI groundout.

Goldschmidt, Ender Inciarte and A.J. Pollock each got three of Arizona's 17 hits. Welington Castillo added his sixth homer in eight games and said he was not even aware of his power streak.

''I don't know how to explain what's going on right now,'' Castillo said. ''Just go there, see the ball, hit the ball, and just try to keep everything simple. I really feel good.''

Arizona has won nine of 13.

The Diamondbacks trailed 2-1 in the sixth when Nick Ahmed tried to put down a sacrifice with runners at first and second and no outs. Barrett (3-3) fielded the ball but made an errant throw that went into foul territory, letting both runners score.

''I was honestly just trying to get rid of it as fast as I could,'' Barrett said. ''I was just trying to get an out. It just got away.''

Ahmed wound up reaching third base, and was credited with a single. Pinch-hitter Jarrod Saltalamacchia followed with a broken-bat single for another run and Aaron Hill later drew a bases-loaded walk for his second RBI, making it 5-2.

Castillo hit a three-run homer in the eighth and Arizona scored three more in the ninth.

Moore, a first baseman and outfielder, made his first major league pitching appearance, retiring Goldschmidt and Hill and also hitting Castillo with a pitch.

Rubby De La Rosa (9-5) went five innings for the win.

Nationals starter Gio Gonzalez struck out seven in five innings. He left with a 2-1 after a leadoff single in the sixth.

Arizona finished with 15 singles and kept putting runners on base. The Diamondbacks finished 6-for-18 with runners in scoring position.

Michael A. Taylor hit a two-run homer for the Nationals in that ninth.

ON A ROLL

Castillo has nine RBIs and two doubles during his hot streak. He's also gone 11 for 28 on this road trip.

TRAINER'S ROOM

Diamondbacks: Chief baseball officer Tony La Russa said RHP Chase Anderson (triceps inflammation) will come off the disabled list and start either Friday or Saturday.

Nationals: RHP Stephen Strasburg (left oblique strain) felt fine after throwing a bullpen session on Wednesday. Manager Matt Williams said they'll see how he feels Thursday before making some decisions. ... CF Denard Span (back tightness) hit and took fly balls in the outfield for the first time before the game. Span also felt fine and said he wants to wait and see how he's doing Thursday.

UP NEXT

Arizona RHP Jeremy Hellickson (7-7, 4.95) has struck out 24 in his last 27 1-3 innings and will start in the series finale against Washington RHP Joe Ross (2-3, 3.00), a rookie who's never started vs. the Diamondbacks.