CHICAGO (AP) -- Both the Chicago Cubs and Colorado Rockies ran out of relief pitchers in a marathon game. The Rockies then turned to a starter. The Cubs used a catcher - and won. John Baker scored the winning run in the bottom of the 16th inning after pitching a scoreless top half, and the Cubs overcame a three-run deficit to beat Colorado 4-3 on Tuesday night. Baker scored on Starlin Castro's fly to end a game that lasted 6 hours, 27 minutes, a record for longest game by time for both teams. ''It's really cool to get a chance to do this,'' Baker said. ''I was having trouble not smiling on the mound. You never get opportunities to do things like this.'' The 33-year-old Baker joked that might not have pitched since he was college-aged. ''It was the Cape Cod League,'' he said. ''I believe I had like a 27.00 ERA, but I was getting squeezed from what I remember.'' Chicago used seven relievers before Baker (1-0) became the first Cubs position player to take the mound since Aug. 27, 2012, when Joe Mather faced Milwaukee. The Rockies also used all seven relievers in their bullpen, then turned to Tyler Matzek, a starter in the 16th. Matzek (2-5) walked Baker to lead off the inning. Baker advanced to second on a sacrifice, then third on Anthony Rizzo's bloop single before scoring. ''I've thrown in the pen before and had a routine down,'' Matzek said. ''So it wasn't anything crazy. I just didn't execute.'' Chicago's Emilio Bonifacio had game-tying two-run homer in the fourth inning and a double among four hits. He is 14 for 35 since returning from the disabled list (strained right oblique) on July 22. Rockies first baseman Justin Morneau returned from the disabled list and drove in two runs with a double. Corey Dickerson added two hits and an RBI Morneau, who had been out since July 13 with a strained neck, entered hitting .312, third best in the National League. He leads Colorado with 62 RBIs. Cubs starter Edwin Jackson lasted through just four innings, laboring with 105 pitches, and allowing three runs on six hits and three walks. Jackson allowed all three Colorado runs in the first, then Chicago's bullpen - plus Baker - held the Rockies scoreless for 15 innings. ''When you go 15 innings without scoring a run, you don't deserve to win,'' Colorado manager Walt Weiss said. Rockies ace Jorge De La Rosa pitched six innings, allowing three runs and striking out seven. The left-hander entered with wins in five straight decisions dating to June 24. Both teams had chances to win in the 10th. Colorado's D.J. LeMahieu missed on a suicide squeeze with Morneau on third and Charlie Culberson on second. Morneau was tagged out by catcher Welington Castillo. In the bottom of the inning, Castillo lined a drive deep to center field with one out and Castro on second. But the Rockies' Charlie Blackmon raced back and made a spectacular diving catch. TRAINER'S ROOM Rockies: In addition to Morneau, the Rockies activated left-handed reliever Boone Logan from the DL (diverticulitis/intestinal inflammation). Logan pitched a scoreless ninth. The Rockies also recalled infielder Cristhian Adames from Triple-A Colorado Springs before the game because infielder Josh Rutledge has an upper-respiratory infection. Cubs: The Cubs placed right-handed reliever Neil Ramirez on the 15-day disabled list with a sore triceps. ON DECK Colorado left-hander Brett Anderson (1-3, 3.24 ERA) faces Chicago left-hander Travis Wood (7-9, 5.06 ERA) on Wednesday night. Anderson allowed no runs and two hits in 6 1-3 innings last Friday to earn his first win with Colorado. Wood is 1-1 with a 1.80 ERA in four career games against the Rockies. CLEAR PICTURE: Morneau went 2 for 4 in a rehab game at Triple-A Colorado Springs on Monday, but really felt ready to return when an MRI of his neck showed no serious damage, such as nerve impingement. ''Hopefully it's good to for the rest of the year,'' he said. GUT-CHECK Logan said the pain from his diverticulitis was debilitating and affected his pitching shoulder. ''My (left) collarbone was killing me,'' he said. ''It was like it was broke in half because of the pain shooting.'' DEALING? Are the Cubs potential sellers as Thursday's trade deadline nears? ''I expect to be active, we're having a lot of conversations,'' GM Jed Hoyer said. ''It's still early, but tomorrow is sort of moving day.''