PHOENIX (AP) -- Cliff Pennington's single in the 16th inning brought home Jason Kubel from second to give the Arizona Diamondbacks a 10-9 victory over the St. Louis Cardinals in a game that didn't end until early Thursday. At 5 hours and 32 minutes, it was the longest home game in Diamondbacks history as far as time elapsed and tied for the longest at home in terms of innings. Yadier Molina drove in three runs, including a leadoff home run that put St. Louis up 8-7 in the seventh, but Aaron Hill's RBI single tied it at 8 before both teams scored a run in the 12th. The Diamondbacks came from behind four times to either take the lead or tie the game. Paul Goldschmidt and Martin Prado each hit a two-run homer, and Gerardo Parra homered, tripled and singled for the Diamondbacks.