HOUSTON (AP) -- J.A. Happ hadn't won in more than two months.
So Houston's starter was relieved to finally pick up a victory Tuesday night.
Clint Barmes homered and drove in a season-high three runs and Michael Bourn added three RBIs to help Happ break a seven-game losing streak in the Astros' 7-6 win over the Washington Nationals .
Happ (4-11) yielded seven hits and five runs with four walks in 5 2-3 innings to break the career-long skid and win for the first time since May 14, a string of 10 straight starts without a victory.
It had been so long, he didn't remember when he last won.
"It seems likes it's been a while," he said. "I don't know the specifics, but too long, so hopefully we can build off this one and try to get some momentum."
Happ said he was encouraged by his teammates telling him before and during Tuesday's game that they were going to pick him up in this one.
"I was just trying to get some positive energy going and that's nice to hear, especially when things are going tough for us and for me," he said. "So I think that helped tonight."
Barmes hit his two-run shot in the second inning and added a run on a single in the fourth. Bourn pushed Houston's lead to 6-2 in the fourth with a two-run double. His run-scoring single in the sixth made it 7-5 after Washington scored three in the sixth.
"To see Happ throw the way that he did is huge for us and obviously for him as well because he's got (a lot of) talent," Barmes said. "He's going to be a huge asset to this team. So hopefully he can build from this and he's only going to make us better."
Michael Morse and Jerry Hairston Jr. both homered and had three hits and two RBIs for the Nationals.
Houston closer Mark Melancon hit Morse with a pitch with two outs in the ninth before walking Jayson Werth , but struck out Wilson Ramos to get his eighth save.
Nationals starter Jordan Zimmermann (6-8) allowed a season-high six runs and seven hits in five innings in his shortest outing of the season. He took a grounder from Angel Sanchez off his left leg in the first inning, but appeared to be OK after being checked out by trainers and throwing a couple of warmup pitches.
He said getting hit wasn't the reason he struggled.
"No. I just didn't have a good feel for much of anything," he said. "My slider was pretty terrible tonight, and I had a rough time locating the fastball. When you have nights like that, you are going to get hit around. It's a shame the offense puts up six runs, and I feel like I didn't do my part."
Hairston singled to left field in the eighth inning, but Carlos Lee grabbed the ball after it bounced off the wall and launched it to Sanchez who tagged him out at second base.
Morse hit a ground-rule double to start the seventh inning before advancing to third on a single by Werth. Morse scored when Ramos grounded into a double play to get Washington within 7-6.
"That was a tough game," Nationals manager Davey Johnson said. "I liked our offense. I didn't like our pitching so much."
Humberto Quintero singled with two outs in the sixth inning before pinch-hitter Brian Bogusevic walked. Bourn followed with a single that sailed just out of reach of a leaping Ryan Zimmerman and into left field to leave Houston ahead 7-5.
Hairston's homer came with one out in the sixth and cut Houston's lead to 6-4. It was his first game back after being activated from the disabled list on Monday after recovering from a broken bone in his right wrist.
Happ walked pinch-hitter Alex Cora after Hairston's homer before he was replaced by Fernando Rodriguez with two outs. A wild pitch by Rodriguez sent Cora to second before he scored on a single by Ian Desmond to get the Nationals within 6-5. Rodriguez struck out Zimmerman to end the inning.
Barmes put Houston up 3-2 with a run-scoring single to center field in the fourth. Lee singled before a double by Chris Johnson to set up that score. A single by Humberto Quintero scored Johnson and pushed the lead to 4-2.
Happ hit a sacrifice bunt before Bourn's two-RBI double left Houston ahead 6-2 later in the inning.
Ryan Zimmerman walked in the third inning before Morse extended his career high with his 17th homer of the season and second in as many days, to tie it at 2-all.
Lee singled with one out in the second inning before the two-out homer by Barmes put Houston up 2-0.
"We were able to get to their pitcher early," Bourn said. "To me he had good stuff, he just left some balls up and we were able to take advantage of them."
NOTES: Houston traded 2B Jeff Keppinger to the Giants for two Double-A pitchers before the game. ... Houston Texans defensive end J.J. Watt, the 11th overall pick in this year's NFL draft, took batting practice with the Astros before the game. ... The Nationals reinstated RHP Chad Gaudin from the DL and designated him for assignment. Gaudin missed 75 games after being placed on the DL in April with right shoulder inflammation. He went 1-1 with a 6.48 ERA in 10 appearances for Washington this season. ... Houston C Jason Castro , who has been out all season after surgery on his right knee, will travel to Florida on Wednesday to continue his rehabilitation at the Astros' spring training facility.