CHICAGO -- The Rockies tried to squeeze a victory, only to see their chances burst.
An attempted suicide squeeze by DJ LeMahieu with one out in the top of the 10th went awry. Then the Cubs won it, 4-3, on Starlin Castro's bases-loaded sacrifice fly in the bottom of the 16th inning at Wrigley Field in front of 28,590.
The game was the longest in the history of both clubs at six hours and 27 minutes. It surpassed the Rockies' 22-inning, 2-1 victory over the Padres (six hours, 16 minutes on April 17, 2008) and the Cubs' 2-1 loss to the Dodgers at Wrigley on Aug. 17-18, 1982 (six hours and 10 minutes).
The Rockies scored three times in the first inning. The botched squeeze was the closest they came to crossing the plate afterward.
"Fifteen innings without scoring a run, you don't deserve to win," manager Walt Weiss said. "Three runs in the first, and their starter, [Edwin Jackson], was out of the game early. You can't win that game, you don't deserve to win."
Cubs catcher John Baker (1-0) was the star. He entered to pitch the top of the 16th and lobbed a scoreless inning, which he finished by getting Cristhian Adames to ground into a double play.
"No matter how hard or soft I threw the ball, it ended up in that 76 to 79 range, which is five miles an hour below the straight hitting speed," Baker said.
In the bottom of the 16th, Baker drew a leadoff walk from rookie lefty Tyler Matzek (2-5), a starter forced into duty. Matzek then hit Arismendy Alcantara and gave up an Anthony Rizzo single to set up Castro.
Matzek pitched in relief for part of last season at Double-A Tulsa, in the Arizona Fall League and in Major League camp.
"The 15th, they said, 'Start playing catch, you might come into the game,'" Matzek said. "It's different, but I've thrown in the 'pen before, so I had everything down. It was nothing crazy."
Baker -- pitching for the first time since his college days in the Cape Cod League -- became the first National League position player to earn a pitching victory since the Phillies' Wilson Valdez did so against the Reds in 2011, and the first Major Leaguer since the Orioles' Chris Davis against the Red Sox on May 6, 2012. One Rockies position player has earned a win -- catcher Brent Mayne at Coors Field against the Braves on Aug. 22, 2000.
It was the eighth straight road loss for the Rockies, who struck out 18 times. The events leading to one strikeout were particularly lamentable.
With Justin Morneau at third and Charlie Culberson at second, the Rockies dialed up a bunt for LeMahieu, one of the team's best bat-handlers. But LeMahieu couldn't touch the pitch from Blake Parker. Morneau, fresh off the disabled list and not the fastest man in the game, had no chance. His spin move didn't fool Cubs catcher Welington Castillo.
LeMahieu fanned to end the inning and slammed his bat against home plate in disgust.
Center fielder Charlie Blackmon saved the game in the 10th when he sprinted deep and made a full-length dive to snare Castillo's drive off Matt Belisle, with Castro at second base. Blackmon also dove, running inward, to rob Castillo with two on and two out in the first.
Blackmon had switched to right field by the 16th. Castro's game-winning drive went his way and the throw reached the plate on the fly, but not in time.
Until that point the game was a classic struggle between evenly matched teams. But now the Cubs are a game and a half better than the Rockies, who have the NL's worst record.
Starter Jorge De La Rosa threw 118 pitches and wasn't at his sharpest, but he lasted six innings and gave up three runs on six hits and one walk with seven strikeouts.
De La Rosa started with a three-run lead, thanks to three hits that included Nolan Arenado's RBI double and Morneau's two-run double -- on his first pitch after missing seven games with a neck strain. De La Rosa yielded a double to Emilio Bonifacio and singles to Alcantara and Rizzo, with the last driving in a run.
The only other runs came on Bonifacio's second homer of the season, good for two runs, on a split-finger pitch that didn't dive.
Meanwhile, Jackson's night was long but short at the same time. He matched De La Rosa's deliberate pace, but his 118 pitches were good for just four innings.
So the starters threw a combined 223 pitches in 10 innings. Then the game got long.
That left the game to the bullpens, which entered a combined 26-40 but held against each other. The Cubs had 12 scoreless innings, the Rockies nine until the 16th.
For the Cubs, Carlos Villanueva went 2 2/3 innings, Wesley Wright one-third, Justin Grimm and Brian Schlitter one, and Parker, James Russell and Pedro Strop two apiece. The Rockies held serve with Tommy Kahnle, Adam Ottavino, Boone Logan -- in his return after missing seven games with diverticulitis -- Matt Belisle, Rex Brothers, Nick Masset and LaTroy Hawkins.
In the 15th, Hawkins took a looking strikeout against Strop in his first plate appearance since Aug. 18, 2007. Hawkins, an American League starter early in a career that is now in its 20th season, has just eight career plate appearances.
Thomas Harding is a reporter for MLB.com. Read his blog, Hardball in the Rockies, and follow him on Twitter @harding_at_mlb. This story was not subject to the approval of Major League Baseball or its clubs.