PITTSBURGH -- The Chicago Cubs' first losing month of the regular season in almost two years ended Tuesday night, but not before they suffered one final insult.

Hindered by an unusual play and a sluggish offense, the Cubs lost to the Pittsburgh Pirates, 3-0, in front of 17,054 at PNC Park.

Chicago finished June with an 11-14 record, the first time it's posted a losing month since August 2007, when it went 12-16. The Cubs have been shut out twice in the last three games, scoring just three runs in the other, and have scored three runs or fewer in 13 games this June.

"The first half, we've been like that -- so inconsistent," Alfonso Soriano said. "One day we'll score 10 runs, five, six, then not score runs. I don't know what's going on, but I hope that everything happened now, it's in the first half. I hope in the second half everybody starts playing better."

The only run the Pirates needed came in the fourth inning, when Freddy Sanchez scored on an error. With two out and a runner on first, Andy LaRoche singled to left to set the stage for the atypical play. Although Brandon Moss struck out swinging, the ball got away from Geovany Soto on a wild pitch from Ted Lilly, and Sanchez raced home from second. The Cubs almost got the out at the plate, but Soto's throw got away from Lilly.

Lilly said he wasn't caught off guard by Sanchez breaking for home, saying he did see him out of the corner of his eye.

"I should've caught it," Lilly said. "For some reason I just didn't see it very well. I was ready for the ball, it just got behind me."

Before the Pirates scored in both the fourth and fifth, Lilly threw three hitless innings to start the game. He lasted seven innings and gave up eight hits -- six of which were singles. He has lost his last two starts but remains the club's wins leader, with seven.

Offensively, the Cubs were dominated by Ross Ohlendorf. In his first career start against the NL Central rival, Ohlendorf held the Cubs to four hits. Chicago finished with six on the night and went 0-for-5 with runners in scoring position, stranding seven on base.

"I think we've forgotten how to hit," manager Lou Piniella said. "I think that's the problem. I think we've forgotten how to hit, especially with men on base."

Although Ohlendorf pitched well, the Cubs did have an opportunity to score against him in his seventh and final inning. After two straight outs, Soto and Mike Fontenot hit back-to-back singles. But on Fontenot's hit, Soto took a peek at Pirates left fielder Moss and attempted to go to third. Moss fired to LaRoche, and the ball easily beat Soto to the bag. It wiped out Chicago's first chance to have an at-bat with two runners on base.

"That's a bad play," Soto said. "That's all I got to say about it. You can't be the first and third out of an inning thrown out at third. That's the bottom line right there."

Chicago had another scoring chance in the eighth. Ryan Theriot reached on a single, and pinch-hitter Milton Bradley did the same. The Cubs were helped by an error by shortstop Jack Wilson, whose high throw to second allowed Theriot to move to third and Bradley to move to second with no outs. But two strikeouts and a groundout kept the Cubs scoreless.

An earlier opportunity was lost in the fifth. Soto doubled to center field on a 3-1 count with one out to put a runner in scoring position for the first time. After posting four doubles the first two months, the catcher had five in June.

But the offense stalled as both Fontenot and Theriot struck out looking. Ohlendorf had eight strikeouts in the game, which set a career high. His previous high was five, which he accomplished five times.

Soto reached base for the third time with a two-out walk in the ninth, but Fontenot flew out to Moss to end the game.

"Just right now, we got to find a rhythm," Soto said. "It's kind of tough right now to say that, but it's the reality we have. We got to find a rhythm and keep going with it."