CHICAGO -- Jason Bay and the Pittsburgh Pirates don't plan on celebrating their move out of last place for long.
Bay homered twice and Jose Bautista scored the go-ahead run in the ninth inning on a wild pitch as the Pirates escaped the cellar in the NL Central with a 6-5 victory over the Chicago Cubs on Tuesday night.
The Cubs (55-83) have lost five straight against the Pirates (56-83) and fell behind Pittsburgh into last place in the division for the first time this season.
The Pirates started the season 0-6 and had sat at the bottom all year.
"It's a little moral victory for us," Bay said. "You don't want to run around and throw a party because you got out of last place."
The Pirates have won six of eight, while Chicago lost for the 15th time in 18 games and now own the worst record in the National League.
"It's tough to be out there, playing in a game, people are saying it's the two worst teams. It's not fun," Cubs first baseman Derrek Lee said. "It wasn't expected, that's for sure. We thought we had a good team going into the spring. Obviously, we had some different circumstances this year, but we are still expected to play better than this."
With two outs in the ninth and Bautista on first, Cubs closer Ryan Dempster (1-8) walked Freddy Sanchez and Bay to load the bases. On the first pitch to Xavier Nady, Dempster threw a wild a pitch allowing Bautista to score and giving the Pirates a 6-5 lead.
John Grabow (4-1) pitched a scoreless eighth for the victory. Salomon Torres got the final three outs for his third save.
Pittsburgh earned its first season-series win over Chicago since 2000 when the Pirates took nine of 12 games. The Pirates are 8-5 against the Cubs this season.
The crowd of 31,494 was the Cubs' smallest at home this season.
"This is one of many low points of the year, actually. We just have to keep playing. We have these guys the next two days," Cubs manager Dusty Baker said.
Bautista singled in the first inning off Cubs starter Juan Mateo. With two outs, Bay homered for the 30th time this season to put the Pirates up 2-0. Bay became the second right-handed hitter in club history to hit at least 30 home runs in consecutive seasons. Hall of Famer Ralph Kiner reached the mark in six straight seasons from 1947-52.
"I didn't realize it. It did mean a lot. I still don't consider myself a home run hitter," Bay said.
Bautista hit an RBI triple in the third inning, and Bay drove in Bautista with his second homer of the night on the first pitch from Mateo to make it 5-1.
The Pirates have hit only three homers in 12 games, all by Bay. He hadn't gone deep since Aug. 28 against the Cubs in Pittsburgh.
Mateo pitched four innings and allowed five runs and six hits. He struck out seven and hit a batter.
Lee had an RBI single in the first inning for Chicago.
Trailing 5-1, the Cubs came back and tied the game.
Ryan Theriot tripled and scored on Aramis Ramirez's groundout in the third inning. Juan Pierre singled with the bases loaded in the fourth, driving in two runs and chasing Pirates starter Victor Santos.
In the fifth, with Matt Murton on first and Jacque Jones on third, Pirates reliever Marty McLeary made an errant pickoff throw to first allowing Jones to score the tying run.
Santos allowing four runs and nine hits in 3 1/3 innings.
An MRI exam of Carlos Zambrano's back revealed no significant damage, but it was unclear when he would be able to pitch again for the Cubs. ... Bay had his ninth career multihomer game. ... Ramirez was ejected in the fourth inning when he slammed down his helmet after being called out on a close play at first base by umpire Tom Hallion. ... Jack Wilson pinch hit in the eighth inning for the Pirates and stayed in the game at shortstop. He has missed 11 consecutive starts due to an inner ear infection. ... The last time Pittsburgh won five games in a row against the Cubs was Sept. 19-27, 1990.