Alex Wood showed a bit of youth and temper when he cursed out umpire C.B. Bucknor after being ejected in the sixth inning Wednesday but his fit of indignation seemed to give the Braves a much-needed spark at Nationals Park.

Homers by Dan Uggla and Justin Upton fueled a three-run sixth inning that erased a two-run deficit and sent the Braves to a 5-2 win against Washington reducing Atlanta’s National League East magic number from four to two.

The Braves could clinch their first division title since 2005 as soon as Friday in a series opener against the Cubs at Wrigley Field. Any combination of Braves wins and Nationals losses totaling two gives Atlanta the crown.

While the Braves are off Thursday the Nationals open a four-game home series against Miami. The Braves had lost three in a row and nine of 13 before Wednesday and seen their lead over St. Louis for the NL’s best record was trimmed to one game.

The resurgent Nationals trying to overcome long odds for a wild-card spot got five near-perfect innings from Ross Ohlendorf (4-1). But a questionable call by Bucknor and Wood’s reaction awoke the slumbering Braves and Craig Kimbrel pitched a perfect ninth inning for his 48th save after blowing one Tuesday.

Wood limited the Nationals to four singles and no walks through four scoreless innings then got in a jam in the fifth after a leadoff single a sacrifice bunt and an error by first baseman Freddie Freeman put runners on the corners with one out.

Ryan Zimmerman walked to load the bases and bring up Jayson Werth one of baseball’s hottest hitters. Wood 22 got ahead of Werth then saw him foul off a couple of two-strike pitches before taking a full-count pitch on the inside edge.

Werth immediately flicked his bat and headed to first base before Bucknor even called it a ball. When the umpire did Wood waved his glove in anger and said something to Bucknor. Bucknor appeared to warn him and manager Fredi Gonzalez was ejected after he ran interference and got in Bucknor’s face to argue.

The walk brought in the game’s first run and Bryce Harper followed with a sacrifice fly for a 2-0 Nationals lead.

Bench coach Carlos Tosca came out to replace Wood who said something to Bucknor as he walked off the mound. The ump ejected Wood who became furious. Instead of walking directly to the dugout Wood took a couple of steps in the direction of Bucknor and dropped a few verbal f-bombs before exiting.

Reliever Kameron Loe got the third out then Braves hitters went to work. Ohlendorf faced 15 through five giving up only a fourth-inning single by Upton who was erased when Freddie Freeman lined into a double play.