CHICAGO -- Darwin Barney felt he made a baserunning mistake by not scoring on pinch-hitter Carlos Pena's double. He made up for it, and for a lot of the Cubs' recent struggles, on the next play.
Barney slid safely home on a fielder's choice by Aramis Ramirez with one out in the eighth inning Monday night to lift the Cubs to a 1-0 victory over the Brewers.
"That was awesome," said Cubs starter Ryan Dempster, who threw seven shutout innings but didn't get a decision. "They're a really good team. They're playing really good baseball right now. We just had a really tough road trip and came out today and played this game as hard as we could."
The win was only the Cubs' third in their last 11 games, and came after a 2-8 trip against the Cardinals, Reds and Phillies. Their first assignment at home was the Brewers, leaders in the National League Central.
With one out in the eighth against Kameron Loe (2-6), Barney singled to left and reached third on Pena's double off the left-field wall.
"Every other ball hit in the air went nowhere," Barney said. "I made the wrong read and luckily I still got to third. I should've scored on that play."
Ramirez then hit a chopper to second baseman Rickie Weeks, who threw home but Barney slid safely around catcher Jonathan Lucroy and was safe.
"I'm going hard and you've got your sights on the catcher and you're looking for a hole and there wasn't a really big hole there," Barney said. "I had to go over his leg and under his hand and try to slip your hand in there. That's all you're thinking. You're bearing down and staring at your spot and trying to find one. Luckily, I got in there."
After Ramirez flied out to the warning track in the fourth and sixth innings, all it took to win the game was a ball in the infield.
"We had set that up," Cubs manager Mike Quade said of the game-winning play. "[Barney] did a fabulous job. We still needed an unbelievable slide from him to get him in there."
Jeff Samardzija (4-2), who took over the right-handed setup role with Kerry Wood going on the disabled list on Monday, picked up the win, pitching one inning in relief.
"I'm trying to do the same things I've been doing all year," Samardzija said. "As a whole, I've felt great and made some good pitches, and I'll still continue to get better.
"Hopefully, we'll be in a lot of situations where we need three outs late in the game and when it comes up, I hope to be out there pitching."
Dempster had the edge coming into the game with a 15-3 record and 2.60 ERA in 22 career starts against the Brewers. It's the most wins of any active pitcher against Milwaukee. Pitching in his 500th career game, he gave up four hits and struck out seven over seven innings.
"Man, he was just fantastic," Quade said of Dempster, 6-0 and now with a 1.83 ERA in his last eight starts against the Brewers.
The Cubs threatened in the seventh. With one out, Lou Montanez singled to center and moved up on DJ LeMahieu's single, his second big league hit. But Tony Campana flied out and Blake DeWitt, batting for Dempster, flied out to right.
Milwaukee starter Randy Wolf also threw seven scoreless innings and also struck out seven.
Quade started as many right-handers as he could against Wolf, including Jeff Baker, who was activated from the disabled list on Monday. LeMahieu also got his first start at first base, and was tested early by a low throw from shortstop Starlin Castro in the second. LeMahieu couldn't handle it, and Castro was charged with an error. No harm, as Dempster got Wil Nieves to ground into a double play.
Yuniesky Betancourt doubled to lead off the Brewers fifth, moved up on Nieves' sacrifice and then broke for home on a suicide-squeeze attempt by Wolf. But Wolf couldn't make contact and the Cubs got nearly everyone in the infield involved in a 2-5-1-6-4-2 rundown.
"I think Dempster saw the squeeze and threw the ball way off the plate," Wolf said. "I tried to reach for it, but I couldn't even foul it off."
"It's a count where I know [Dempster] is going to try to throw a strike, because he doesn't want to face Rickie and then [Mark] Kotsay with a runner on third," Milwaukee manager Ron Roenicke said.
After the game, Dempster was wearing a T-shirt that depicted a goat with the red "no" sign -- picture a no smoking sign. Any significance? He said, no, it was a clean shirt in his locker.
"What happened in the past is irrelevant," he said addressing the team's recent struggle on the road, not the Cubs' history. "Who cares? We can't do anything about it. We can sit and drag our heads or we can just come every day and play as hard as we can and that's what we're going to do."
Carrie Muskat is a reporter for MLB.com. She writes a blog, Muskat Ramblings, and you can follow her on Twitter@CarrieMuskat. This story was not subject to the approval of Major League Baseball or its clubs.