Updated

Matt Holliday raced home on Jamey Carroll's shallow fly ball, capping a stunning, three-run rally in the 13th inning against Trevor Hoffman and leading the Colorado Rockies over the San Diego Padres 9-8 Monday night for the NL wild card.

After Scott Hairston's two-run homer put the Padres ahead in the top of the 13th, Colorado came back against baseball's career saves leader.

The Rockies won the longest one-game tiebreaker in major league history, and advanced to play Philadelphia in the first round.

Kaz Matsui and Troy Tulowitzki hit back-to-back doubles off Hoffman, making it 8-7, and Holliday tripled off the wall in right to tie it.

After Todd Helton was intentionally walked, Carroll lined out to right fielder Brian Giles.

Giles' throw home bounced in front of catcher Michael Barrett, who couldn't hold on as Holliday swiped the plate, then lay face-down after cutting his chin with his headfirst slide. Umpire Tim McClelland made a delayed safe call, and replays were inconclusive on whether Holliday touched the plate with his left hand or was blocked by Barrett's left foot.

"I don't know. He hit me pretty good," Holliday said. "I got stepped on and banged my chin. I'm all right."

Hoffman (4-5) blew his seventh save chance in 49 tries. On Saturday, he was one strike away from clinching a playoff spot when Tony Gwynn Jr. hit a tying triple for Milwaukee, which went on to win 4-3 in 11 innings.

The Rockies won the longest game at Coors Field this season behind Holliday, the MVP candidate who won the NL batting title at .340. He also drove in two runs to take the league RBI crown with 137, one more than Philadelphia's Ryan Howard.

Ramon Ortiz (1-0) got the win. He was the Rockies' 10th pitcher, taking over after Jorge Julio gave up Hairston's homer.