CHICAGO -- Carlos Marmol knows it's not right.
The Cubs closer got the win Wednesday thanks to Aramis Ramirez's walk-off ninth-inning single in his first pinch-hit attempt of the season, which scored Tony Campana for a 2-1 Cubs victory. But the game belonged to starter Ryan Dempster.
A pitchers' duel between Dempster and Tim Lincecum transitioned into a wild ninth, when Emmanuel Burriss hit an RBI single off Marmol to tie the game at 1. Marmol (2-2) had replaced Dempster earlier in the inning after he gave up a leadoff double to pinch-hitter Pat Burrell. Before that, Dempster had retired 20 consecutive batters.
Marmol gave up another single to load the bases with one out but got Cody Ross to ground into a double play to end the inning and set up Ramirez's heroics that snapped the Giants' seven-game winning streak.
"You don't want to win that way," Marmol said. "I want to get three outs. Dempster did a nice job. I feel bad for him. He deserves the win. I don't want that win. I want to give it to Dempster."
The Cubs' Opening Day starter gave up three hits, struck out six, walked none and threw 83 pitches over eight-plus innings, the first time this season he's gone more than seven. Cubs manager Mike Quade said Dempster pleaded with him to stay in the game, though Quade had already signaled for Marmol.
"Deep down I don't want him losing that game, in spite of the pitch count and everything else," Quade said. "He didn't get a win, but it's not going to take away from that performance. ... I wanted to give him a shot, but a walk or an extra-base hit in that situation and I think I have to get Marmol in the game. A single, and we let him try to pitch through at least another hitter."
After Marmol escaped the bases-loaded jam, Campana, who entered the game in the top of the ninth as a defensive replacement, led off the bottom half by squibbing a grounder past diving third baseman Pablo Sandoval. Miguel Tejada's throw was late, giving the speedy Campana a single. Reed Johnson then laid down a sacrifice bunt to move Campana to second, and Geovany Soto's groundout pushed Campana to third.
Ramirez then stepped to the plate for his 37th career pinch-hit attempt and lined a single to left off Sergio Romo (3-1) to score Campana, and the Cubs celebrated on the infield.
Campana dived and barely missed two balls in the top half of the ninth, so scoring the winning run was especially nice.
"After messing up in center field a little bit and not making some plays that I think I should make, coming in and getting on base, scoring the winning run felt very good," the rookie center fielder said.
Dempster walked none for the third time this season.
"This is probably the best job I've done executing pitches all year," he said. "I just kept attacking and was able to keep the ball down and out of the fat part of the plate. I think maybe sometimes I make it a little harder on myself than I need to as far as trying to be too perfect or trying to make a better pitch than you have to make. Just attack and make good pitches."
After stranding a runner at third with no outs in the fifth, the Cubs broke through off Lincecum in the seventh. Carlos Pena led off the inning with a double. Blake DeWitt then lined a single to right to score Pena.
Lincecum wasn't surprised by Dempster's performance.
"He's a tough guy for us to face most of the time," Lincecum said. "That's what we got tonight and that's what I've come to expect from him."
Alex Ruppenthal is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.