PITTSBURGH -- Apparently the 23-run, 33-hit offensive party the Pirates and Dodgers put on Wednesday night was not enough baseball for both teams.

Pittsburgh and Los Angeles combined for a 12-inning affair Thursday afternoon that lasted three hours, 54 minutes. When it was all said and done, the Dodgers left PNC Park with a 4-3 victory that denied the Pirates a split in the four-game series.

Dodgers first baseman James Loney drove in catcher Russell Martin with the go-ahead run in the 12th to improve Los Angeles' September record to 13-3.

"We battled," said Pirates manager John Russell, who was forced to use the back end of his bullpen in the 12th inning after reliable arms Sean Burnett, John Grabow and Matt Capps were used in earlier frames.

Craig Hansen was handed the ball heading into the 12th, but the right-hander's lack of control led to seven straight balls and him walking three of the four batters (one intentional) he faced. T.J. Beam came on in relief and surrendered the game-winning hit to Loney.

"He's been throwing the ball very well his last few outings," Russell said of Hansen, "but couldn't get into any kind of rhythm with his fastball or his slider today."

All blame shouldn't land on Hansen's shoulders alone. Starter Paul Maholm walked an uncharacteristic six batters that helped lead to three runs, and left fielder Nyjer Morgan goofed on the basepaths when he was thrown out at home attempting to score the game-winning run in the 10th.

"It was probably the combination," said Adam LaRoche, when asked if the walks or baserunning blunders hurt the Pirates more. "When you're not winning a lot of games, there's no room for errors. When it all happens in the same game, it makes it that much harder."

Pittsburgh jumped out to a 1-0 lead in the first on Nate McLouth's sacrifice fly, but Maholm gave it back with two outs in the fourth. After a leadoff walk and two strikeouts, Maholm allowed Matt Kemp to reach base with a double that was followed by Blake DeWitt's two-run single.

"I wish I had the pitch back to DeWitt," Maholm said, "because I wish I had thrown him a breaking ball."

The Pirates tied the game at 2 in the sixth on Andy LaRoche's clutch two-out base hit that broke a 1-for-20 spell. The two teams would then exchange runs in the seventh, with the Pirates scoring on Luis Cruz's first career Major League RBI.

After a scoreless eighth and ninth, the Pirates appeared on their way to victory in the 10th frame. Dodgers reliever Chan Ho Park put runners on first and second for Jason Michaels. But on Michaels' short chopper, Park wildly threw to second in an attempt to get McLouth. Park's throw was stopped by a lunging DeWitt, who then threw home to get Morgan in a collision at the plate.

"You'd rather [he] not [go]," Russell said of Morgan's decision. "You [would've had] the bases loaded with one out.

"But situations like that, I know what he's thinking. You don't want to take the aggressiveness away from him, but in that situation with one out, Adam hits a deep fly ball like he did, the game is over."

Adam LaRoche joked after the game that the Pirates need to find a way to control the speedy outfielder on the basepaths. Morgan also cost the Pirates a run in Houston on Sept. 6 in a 3-2 loss to the Astros.

"He needs to know when to use that speed," LaRoche said. "He's not dangerous when he's not on those bases. He's going to pick it up eventually and it's going to be great for us."

Pittsburgh, which came into the game 12-4 in extra-inning games, rallied to put runners on second and third with two outs in the 12th inning, but Michaels popped out to DeWitt in shallow right field to end the game.

"A couple walks hurt in extra innings," Russell said. "But we had the winning run at second. You can't say enough about how these guys continue to fight. You'd just like to be on the other side of it. We had our chances and just couldn't quite come through."

"We've had some pretty bad ones," Adam LaRoche added. "It doesn't help that we played pretty good ball [Wednesday] and basically drove in everybody on base, and today we were the exact opposite."