CHICAGO (AP) - While the attention was on Jon Lester's quest for a second no-hitter, Gerrit Cole kept quietly matching zeros with him.
After the Pirates' bats finally solved Lester and the Pittsburgh ace delivered a much-needed win, Cole had a message for the major league-leading Cubs, too.
Starling Marte singled with one out in the seventh inning to end Lester's no-hit bid, then scored on Jung Ho Kang's double to put Cole and Pittsburgh ahead to stay in a 2-1 victory over Chicago on Sunday.
Kang added an eighth-inning home run to help the Pirates beat the Cubs for the first time in six tries this season.
"It was just an opportunity to try to salvage the series," Cole said. "I don't really think they're the best team in baseball."
Cole (4-3) allowed three hits in eight shutout innings, striking out seven in a 95-pitch performance.
Mark Melancon gave up a run in a shaky ninth but held on for his 11th save in 12 chances to give the Pirates a lift after a frustrating two weeks against their NL Central rivals.
The Cubs took all three games in Pittsburgh early this month, then the first two in this series. Pittsburgh had been outscored 37-11 by Chicago while falling nine backs back in the division.
But Cole stopped that. The right-hander's six wins against the Cubs since the start of 2014 are the most of any pitcher, and he hasn't allowed a homer at Wrigley Field in 45 innings.
Lester (4-2), who threw a no-hitter with Boston in 2008, had permitted only two walks and retired 16 straight batters before Marte's opposite-field liner to right on a changeup.
"We play the game, keep playing the game," Pirates manager Clint Hurdle said. "Everybody in the park knows he's got a no-hitter. He's not winning.
"The longer you go without a hit and you think you can hit, the better your chances are to get one. We felt we were due. We felt we were due for a while against these guys."
Marte stole second and scored on Kang's drive to the gap in right-center, chasing Lester after 109 pitches and alleviating a potentially difficult decision for manager Joe Maddon because of Lester's high pitch count.
"You've got giant numbers out there telling you what your pitch count is at and you have a giant scoreboard telling you you haven't given up any hits," said Lester, who struck out nine. "But it really doesn't matter now."
Kang sent Hector Rondon's 96 mph fastball into the left-field bleachers for his fourth homer, and it turned out to be the decisive run.
Melancon walked Dexter Fowler and allowed Jason Hayward's broken-bat single to put runners at the corners with nobody out in the ninth. But the closer retired the next three hitters, including Anthony Rizzo's sacrifice fly.
The Cubs' third loss in 13 games denied them their sixth series sweep of the year and dropped them to 27-9 after Lester came close to producing the club's second no-hitter of the season.
Jake Arrieta shut down Cincinnati in a 16-0 win on April 21, part of the Cubs' best start since the 1907 season.
The Cubs got little going against Cole. One of their three hits came when Fowler was credited with a double after shortstop Jordy Mercer lost a popup in the sun.
Rizzo went 0 for 3, ending the majors' longest active streak of reaching base at 26 games.
"As close as it looked, both guys were just on their game," Maddon said. "Jonny was fantastic. That's as good as we've seen Cole in a while, so give him credit."
Pirates: LHP Cory Luebke (hamstring) came off the disabled list and RHP A.J. Schugel was optioned to Triple-A Indianapolis.
Cubs: OF Matt Szczur (hamstring) is eligible to come off the disabled list Wednesday.
Pirates: LHP Jonathon Niese (3-2, 5.63 ERA) faces Atlanta RHP Williams Perez (1-0, 3.54) on Monday night in Pittsburgh to begin a stretch of 24 straight games outside the NL Central.
Cubs: Monday marks the team's second day off in five days. RHP Kyle Hendricks (2-2, 3.03) starts Tuesday against RHP Chase Anderson (1-5, 6.11) and Milwaukee to begin a nine-game trip.