Big deficit, no problem for the hard-hitting Washington Nationals.

Ian Desmond, Bryce Harper and Danny Espinosa each homered and drove in two runs as the Nationals rallied from five runs down to beat the San Francisco Giants 14-6 on Sunday.

Jose Lobaton doubled among his three hits, drove in a run and scored three times for National League East-leading Washington, which pounded out 18 hits against the Giants, including 14 against the bullpen.

''It's unbelievable,'' said Harper of the offensive output. ''Like we said before, a couple days ago, we've got a lot of heart. We want to win every single game.''

Craig Stammen (4-4) allowed a run in two innings of relief after a labored four-inning outing from starter Stephen Strasburg.

Giants reliever Jeremy Affeldt (3-2) allowed five hits and five runs in the sixth without retiring a batter after the departure of starter Ryan Vogelsong.

The Nationals scored six runs in the sixth on eight hits, tying for their most hits in an inning since they began playing in D.C. in 2005. That was just another piece of history during a 10-game homestand that included most of a 10-game win streak, five walk-off wins during a six-game stretch, a 9-1 overall record, and the growth of the division lead over Atlanta to eight games.

''This was a great homestand,'' said Scott Hairston, whose pinch-hit double tied plated the fourth run of the sixth inning to tie it at 6-all. ''I've never experienced anything like it. I think it's safe to say nobody has. And it's a lot of fun.''

Gregor Blanco and Travis Ishikawa homered for the Giants, who ended their road trip 3-3.

Brandon Crawford had three singles for San Francisco, which used its bullpen for 11-2/3 innings across the three-game series.

''They've been terrific,'' said Giants manager Bruce Bochy of his pen, which entered Sunday with a 2.57 ERA, third-best in the majors. ''We turn it over to the pen and they do a great job. Our guys ... I feel for them. They played so well early, and that's a tough one to let get away.''

Strasburg allowed five earned runs -- his most at home since the final game of his innings-limit-shortened 2012 season -- on eight hits and two walks. His day ended when pinch-hitter Nate Schierholtz replaced him and popped out to short to end the fourth.

Vogelsong allowed three runs and three hits, and a season high-tying four walks in 5-1/3 innings. He departed with a 6-3 lead after yielding Desmond's homer.

Harper doubled and scored on Affeldt's wild pitch. Lobaton singled in Asdrubal Cabrera and Hairston's double tied it.

''He's been really good all year, Affeldt, according to his numbers,'' Hairston said. ''But we don't pay too much attention to that.''

Jean Machi picked Denard Span off first after entering with the game tied and runners on the corners. But Jayson Werth and Adam LaRoche each had RBI singles to finish the scoring in the sixth.

The Nationals added a run in the seventh and five more in the eighth, including blasts from Harper and Espinosa.

''We need to keep it going,'' Strasburg said. ''As long as we can.''