It’s September, in the heat of a pennant race, and for the second straight day at Nationals Park, a baseball game was influenced significantly by what Washington Nationals rookie outfielder Bryce Harper aptly calls “the Sun Monster.”

A day after the Milwaukee Brewers benefitted from the Nationals losing routine flyballs in the blinding light, the monster switched sides Monday afternoon, helping Washington to a 12-2 rout.

With two outs in the fourth inning, Jayson Werth, himself a victim of the conditions Sunday, lifted a towering fly that center fielder Carlos Gomez completely lost. The ball fell in for a two-run double that turned a tight game into a romp.

“Payback,” Nationals Manager Davey Johnson said. Added Ian Desmond, using the same word as his manager: “It’s funny the way baseball works.”

Jordan Zimmermann pitched perfectly to the conditions, inducing six groundouts in yet another encouraging start that he has moved past a small skid a month ago, allowing only one run over 62 / 3 innings. The Nationals’ offense came to life in that fourth inning against Brewers starter Marco Estrada, buoyed by the lights and shadows cast onto the field by the autumn sun, and then tormented the Milwaukee bullpen. Ryan Zimmerman went 3 for 4, matching a season high with four RBI. Danny Espinosa added three hits, two from the left side of the plate.

The victory added a sliver to the Nationals’ lead over the idle Atlanta Braves in the National League East, pushing it to five games, and shaved their magic number to clinch the division crown down to five. There’s still a possibility the Nationals can claim the division during their upcoming three-game series in Philadelphia. And there’s a possibility that they could host playoff games in similar sunny conditions.

“That was nice to have a little laugher to go on the road,” Johnson said.

Zimmermann looked vulnerable in the second inning, his inside fastball hammered for hits. Corey Hart smashed one to right field for a home run, and Jean Segura, of little power, drilled a triple off the right field wall. But Zimmermann settled in, controlling his command and relying on his secondary pitches, a hooking curveball and sharp slider.

“I tried to get through the first inning on mostly fastballs and mix in a few offspeed,” he said. “I don’t want to show them everything right away. I just tried to throw fastballs first and second inning, first time through the lineup, and then start mixing up later.”

Zimmermann atoned for the home run he allowed by smacking singles in his first two at-bats, none bigger than the second one in the fourth inning. His solid single with two outs drove in Roger Bernadina from second base and extended an inning in which the Nationals would pile more runs on the Brewers. Bernadina was playing for regular left fielder Michael Morse, out with an injured hand. “Little slugger,” Desmond said of Zimmermann with a smirk.

Werth lost a ball hit by Gomez on Sunday, a play that bothered the right fielder. It was only fitting that when he lifted a flyball to center field in the fourth inning Monday that it met the same fate. Gomez settled under where he thought Werth’s towering ball would land. Then, at the last second, he ran and dove far to his left, the ball landing near his outstretched glove.

“I don’t remember . . . worse sun conditions,” Werth said. “Left field in San Fran is tough, but this borders on ridiculous. I’ve never seen anything like it. You almost don’t have a chance out there as the game goes on. The sun starts in left, and it ends in right as the game goes on. It is just a matter of being lucky and not getting a ball hit to you when it’s in your field of vision.”

Harper then drew a walk and Zimmerman added a crushing blow, a three-run home run barely into the first row of seats in center field. A missed routine flyball turned a one-run inning into six runs and a 7-1 lead. The next inning, Kurt Suzuki added a two-run double to make it 9-1, and the Nationals added three more in the eighth. Three of the Nationals bottom four hitters — Espinosa, Suzuki and Zimmermann — went a combined 7 for 12.

“You can’t have any holes in the lineup if you want to win, consistently win,” Johnson said.

Zimmermann allowed one run on four hits, walked two, struck out seven on 106 pitches. It was his fourth straight outing allowing two runs or less and pitching at least five innings.

“I’m glad I’m having a few good ones here as the season is coming to a close,” Zimmermann said. “I feel like if I can stay on my fastball, I’m going to be able to throw what I want and I’m not going to be walking guys”

As the Nationals added to their lead in the eighth, the shadows cast by the grandstands were halfway across the infield and covering left field. It was a pristine sight on a cool September day. But with playoff games, perhaps matinees, just a couple weeks away, the specter of the fickle Sun Monster was not far from anyone’s mind.