MIAMI GARDENS, Fla. -- On the brink of elimination from the playoff race, the Indianapolis Colts dug in.
The Dolphins had a first-and-goal at the 5 with 40 seconds left, but after three consecutive incompletions, rookie center Jamil Douglas snapped the ball prematurely, and Ryan Tannehill was sacked by three Colts.
Indy backup quarterback Matt Hasselbeck departed with an injury for the fourth game in a row, and Whitehurst did just enough in relief, completing two scoring drives. The Colts (7-8) would have been out of the playoff race with a loss.
Miami (5-10) was eliminated two weeks ago, and a half-empty stadium reflected the state of the franchise. The Dolphins have lost three in a row and are 4-7 under interim coach Dan Campbell, who is likely to be replaced after the season.
Indy's Andrew Luck missed his sixth consecutive game with a lacerated kidney and a partially torn abdominal muscle, and Hasselbeck left in the second quarter with a shoulder injury.
Whitehurst completed a third-down pass on his first play, setting up the Colts' second touchdown for a 15-6 lead. He also directed a 10-play drive early in the fourth quarter for a field goal that made it 18-9.
Whitehurst was limping after being sacked on third down with three minutes left, and the Colts had no quarterbacks left to replace him. But he was needed for only one more snap -- out of the victory formation on the final play.
Frank Gore, a South Florida native playing in Miami for the first time, rushed for 85 yards and scored the Colts' touchdowns on runs of 37 and 11 yards. The Colts had six sacks, including rookie T.Y. McGill's first career sack for a safety when he tackled Tannehill in the end zone for the game's first points.
The safety was the fourth allowed by Miami, a franchise record.
Vontae Davis made an interception in the end zone to end a Dolphins threat. A questionable offensive pass interference penalty on the Dolphins' Jarvis Landry negated a Tannehill touchdown pass to Jordan Cameron, and they settled for a field goal.
Landry had seven receptions for 111 yards, including a sensational one-handed catch as he tumbled to the turf for a 26-yard gain.