CHICAGO -- Jack Wilson didn't have much of a day in the field and his contribution to the offense was a couple of fly balls.
The Pittsburgh shortstop went 0-for-6 with an error Tuesday night, but his first sacrifice fly in the ninth inning tied the game and his second came with the bases loaded in the 15th to give the Pirates a 4-3 victory over the Chicago Cubs.
"I think it was by far the worst game of my career and it ended up being two nice sac flies to tie the game and end the game," Wilson said.
Ryan Theriot had three hits and drove in two runs for the Cubs, who lost for the second time in 10 games and had a five-game winning streak snapped.
Ronny Paulino led off the 15th with a single off reliever Neal Cotts (0-1). Jose Bautista followed with a sacrifice bunt that first baseman Derrek Lee fielded, but his throw to second was off the mark. A throwing error by catcher Michael Barrett sent Paulino to third. Pinch-hitter Zach Duke struck out, but Cotts hit Ryan Doumit to load the bases. Wilson followed with his sacrifice fly to left-center.
"It wasn't the best major league game. We had chances, we just didn't take advantages of them," Cubs manager Lou Piniella said in a brief postgame news conference. "We've talked before that we need to take advantage of opportunities, today we didn't, come out and play (Wednesday)."
The Cubs have played five extra-inning games and are 1-4 in them.
Jonah Bayliss (3-2) pitched three scoreless innings of relief for the victory and Salomon Torres worked the 15th for his 10th save. The Pirates won despite leaving 17 runners on in the game that lasted 4 hours, 39 minutes.
"It took everything we possibly had to get the four runs," said Pirates manager Jim Tracy, who was ejected in the seventh inning for arguing a play at second.
Xavier Nady had four hits for the Pirates, who snapped a three-game losing streak.
Alfonso Soriano, not known for his defense, made a great throw from left to throw out Pittsburgh's Don Kelly trying to score the go-ahead run from second with two outs on Jason Bay's single in the 11th.
With one out in the seventh, Cesar Izturis hit a routine bouncer to Wilson at short, who wasn't able to handle it for his third error of the season. Pinch-hitter Darlye Ward followed with a single and Soriano drove in Izturis to give the Cubs a 3-2 lead off Pirates starter Ian Snell.
"It got stuck in my glove. It usually doesn't happen, especially on the easiest ball hit ever," Wilson said. "I'm just glad I had the opportunity to make up for it."
Cubs starter Ted Lilly pitched seven innings, allowing two runs and scattering seven hits.
Cubs closer Ryan Dempster couldn't hold the lead and blew his first save of the season in eight chances. He walked pinch-hitter Nate McLouth with one out and gave up a single to Doumit, who was also pinch hitting. Wilson followed with a sacrifice fly to right to tie it 3-3.
"We had a plethora of wasted opportunities. That eighth inning I thought we put the game away," Piniella said.
Snell pitched seven-plus innings allowing three runs, two earned. He struck out five and didn't allow a walk.
"I don't think you can say enough about the job our starting pitcher Snell did and obviously the job our bullpen did. The job our pitching staff continues to do, you can't give them enough credit," Tracy said.
Lilly gave up a bloop single to Nady in the fourth. With two outs, Paulino doubled to center and outfielder Jacque Jones laid out on the warning track for the ball, but was unable to make the catch and Nady came around to score from first, giving the Pirates a 2-1 lead.
The Cubs tied the game in the fifth. Lilly reached on an infield single, advanced to second on Soriano's bloop single and scored on Theriot's RBI-single to left.
Bay led off the second inning with a double and scored on Paulino's groundout.
Soriano reached base in the third after getting hit in the helmet during his at-bat. Soriano, who wasn't shaken up, stole second and scored on Theriot's single to right. Soriano slid by Paulino's tag at the plate, tying the game.
- Soriano extended his hitting streak to a career-high 16 games. He has reached safely in all 24 games this season.
- Lee extended his hitting streak to 15 games in the eighth inning.
- Scott Eyre's three innings of work was his longest outing for the Cubs since April 26, 2002, when he pitched four innings at Anaheim.
- The Cubs played their longest game since Aug. 15, 2006, a win at Houston that lasted 18 innings.
- The Pirates longest game of the season was on April 19 when the beat Houston in 16 innings.