The Chicago Cubs ran out of relief pitching by the 16th inning, so they called on their backup catcher to get the job done in a 4-3 marathon victory over the Colorado Rockies.

This game, which lasted six hours, 27 minutes, was the longest game (by time) in Cubs history. It surpassed the previous record of six hours, 10 minutes that it took the Cubs and Dodgers to play 21 innings on Aug. 17-18, 1982.

John Baker, who hadn’t pitched since the summer of 2000 for Yarmouth-Dennis in the Cape Cod League, earned his first major league victory after pitching a scoreless 16th inning. Baker led off the bottom of the 16th with a walk and scored on a sacrifice fly by Starlin Castro with the bases loaded.

According to the Elias Sports Bureau, the last Cubs position player believed to have earned a win as a pitcher was Jock Menefee in 1902. Baker’s were needed on the mound because starter Edwin Jackson needed 105 pitches just to throw four innings, and seven Cubs relievers combined to throw 11 scoreless innings and closer Hector Rondon wasn’t available. The Cubs likely will make a roster move before Wednesday night’s game to add a pitcher.