HOUSTON (AP) -- Brian Bogusevic's RBI single in the ninth inning lifted the Houston Astros to a 4-3 victory over the Milwaukee Brewers on Friday night.
It was the first win this season for Houston in its last at-bat and breaks a five-game losing streak. It was Houston's first walk-off win since last Sept. 26, according to STATS LLC.
The Astros won for the fifth time in 39 games. The only team since 1900 to lose at least 35 times in a 39-game span was the 1916 Philadelphia Athletics, who finished 36-117 under Hall of Fame manager Connie Mack, according to STATS.
Wilton Lopez (4-1) struck out two in a perfect ninth inning for the win.
The Brewers have lost 10 straight on the road for the first time since 1992.
Houston trailed 3-2 entering the ninth. Brett Wallace walked with no outs and was replaced by pinch-runner Tyler Greene, who was making his Astros debut after being acquired in a trade with St. Louis on Thursday.
He stole second base and advanced to third on a wild pitch by John Axford (4-7), who was charged with his eighth blown save.
Steve Pearce's RBI single to center tied it at 3. Pearce advanced to second on the play on an error by centerfielder Carlos Gomez.
Gomez made up for his miscue when he made a running, over-the-shoulder catch on a long fly ball to deep center by Scott Moore.
Bogusevic followed with a hard-hit grounder to center to give Houston the win and send the Astros spilling onto the field for a rare celebration in this dreadful season.
Rickie Weeks doubled three times for the Brewers.
Houston's comeback win ruined a good night for Milwaukee starter Mark Rogers. He didn't allow a hit until the fifth inning and gave up three hits -- all singles -- with one run in seven innings. Rogers, who replaced Zack Greinke in the rotation, struck out a career-high eight with two walks.
Carlos Corporan drove in Houston's first run with a single in the fifth inning and added a solo homer in the eighth.
Houston starter Bud Norris yielded eight hits and three runs -- two earned -- in seven innings but didn't factor in the decision to end his winless streak. Norris hasn't won since May 21.
Ryan Braun's double gave Milwaukee a 1-0 lead.
Weeks doubled in the second, fourth and seventh innings. Each of the hits landed in almost the same spot in the corner of left field.
Houston's first hit came with one out in the fifth on a bunt single by Scott Moore which dribbled down the left field line.
Weeks opened the seventh with his third double and scored on a single by Jean Segura to put Milwaukee ahead 3-1.
NOTES: Houston recalled OF Fernando Martinez from Triple-A Oklahoma City on Friday. ... Milwaukee RHP Shaun Marcum, on the 60-day DL with right elbow tightness, is on a rehabilitation assignment with Single-A Wisconsin.