WASHINGTON — The Washington Nationals' attempts to jump-start their season have so far been false starts. Perhaps, on the Fourth of July, the return of Wilson Ramos and an "epiphany" change in the batting order provided the final pieces that can sustain some momentum.

Back after missing 44 games with a strained left hamstring, Ramos hit a go-ahead, three-run homer in the seventh inning Thursday, leading the Nationals to an 8-5 matinee win over the Milwaukee Brewers.

"He's a statement player," shortstop Ian Desmond said. "And definitely somebody who's waiting for his turn in the spotlight."

Ramos put a 1-0 slider from Brandon Kintzler into the left-field stands and received a curtain call. He finished with three hits and a career-high five RBIs.

"I'm excited, happy for this day, for me, for my family, for my team," Ramos said. "They were waiting for me for my return, and I'm happy for this day, and hopefully I will help the team to win a lot of games."

The Nationals earned a split of the four-game series and moved back above .500 in their seesaw season. They've already had plenty of emotional wins this year that might have sparked a chase at the first-place Atlanta Braves in the NL East, but each time they've fallen flat within a few days.

Getting desperate to try anything, manager Davey Johnson joked before the game that he was "going crazy" figuring out how to get the bats going and said he was "having a problem" with his Ouija board.

He decided to flip-flop Desmond and Jayson Werth, batting Desmond second and Werth sixth. Asked why, he said: "I don't know. Because I'm supposed to do something. I had an epiphany last night about 9:30 and I called Desi, and I said, 'Desi, I'm changing something.'"

For at least one day, it was managerial genius.

Desmond had three hits, stole two bases and scored two runs and ignited two scoring rallies. Werth had three hits, an RBI and scored twice.

"Yeah, that came out all right," Johnson said after the game. "You know, once in a while I have a great idea."

Taylor Jordan allowed two runs over 5 2-3 innings in his second major league start, and Drew Storen (3-2) got the win despite blowing a 5-2 lead by allowing two home runs in the seventh inning.

Ramos and the Nationals quickly bailed out Storen with a two-out rally. Werth singled off Tom Gorzelanny (1-1). Brewers manager Ron Roenicke then brought in Brandon Kintzler to face Anthony Rendon in a righty-righty matchup.

The move backfired. Kintzler walked Rendon and gave up the homer to Ramos.

"Just hung a slider," Kintzler said. "What are you going to do? It'll not be the last slider I hang, either. I just didn't make the adjustment quick enough."

Rafael Soriano pitched the ninth for his 22nd save, but he allowed the tying run to come to the plate with two out. It might have been Carlos Gomez, who had homered earlier in the game, but Gomez had been taken out in the double switch that brought Kintzler into the game.

Roenicke said he made the switch because Gomez's bothersome shoulder had tightened up after a collision with the outfield wall. Gomez said he was fine.

"It surprised me when I got out of the game," Gomez said, "especially after I hit a home run."

It was a star-spangled day in the nation's capital. The game began at 11:06 a.m. and featured a national anthem sang by Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, and a new "Freedom Song" performed by Neil Diamond.

There would be fireworks on the later on the National Mall, but only after Ramos had lit up Nationals Park. Johnson essentially called the shot while chatting with bench coach Randy Knorr.

"I was talking to Randy, I said, 'He's had a good day, he might as well just hit one out here,'" Johnson said. "And, boom, sure enough he did."

NOTES: Ramos must love national celebration days. His last three-hit game came on Cinco de Mayo. ... Desmond was doing so well that he was intentionally walked to put Bryce Harper at the plate with the bases loaded and two out in the sixth. Harper grounded out to first, and he is 1 for 15 since returning from a knee injury, and the only hit was a home run in his first at-bat. ... The Brewers were hurt by minor league mistakes. They failed to execute a rundown when Harper was caught between first and second in the third inning, and Juan Francisco strayed too far off first and was thrown out by the cutoff man after an RBI single in the sixth.