PHILADELPHIA (AP) -- Though both teams were tired and had players knocked of out the game due to injuries, the Arizona Diamondbacks and Philadelphia Phillies kept playing -- and playing and playing.
Adam Eaton finally hit a go-ahead double in the 18th inning as Arizona outlasted Philadelphia 12-7 in a record-setting, marathon game for both clubs Saturday night.
"Oh God, it was tough," Arizona manager Kirk Gibson said. "I'm pretty tired, I really don't know what to tell you."
The teams combined to use 20 pitchers in a contest that ended at 2:12 a.m. and took 7 hours, 6 minutes -- setting a mark for length of game for both teams. It was the longest game by time since the Dodgers and Astros played eight minutes longer on June 3, 1989, according to STATS.
The 18 innings also matched the longest game in Diamondbacks history in terms of innings, though the Phillies fell short of the 21-inning club record set in 1918. The teams combined for 137 at-bats, 35 hits, 32 strikeouts and 28 walks. Both teams used 22 of their available 25 players, with only three starting pitchers for each going unused.
"Well, we really didn't have a choice," said Arizona's Cliff Pennington, who walked five times. "You just keep playing. Obviously, all the guys stepped up huge and their guys did a great job too. We just found a way to get runs on the board. We're tired, I know that."
Said Philadelphia's Darin Ruf, "You never know what you're going to see in the game of baseball."
The Phillies began the 18th with outfielder Casper Wells (0-1) on the mound.
"When position players start to pitch, it gets a different feel," Ruf said. "But you still try to win."
Pennington added: "When Casper went in, I thought, 'This is crazy.'"
After retiring the first two batters, Wells walked Tony Campana to start Arizona's five-run inning. With Campana running, Eaton lined a double to left-center to put Arizona in front 8-7.
After Wells intentionally walked Paul Goldschmidt, Martin Prado drove in Eaton with a single to right to give the Diamondbacks a two-run advantage. Gerardo Parra broke the game open with a two-run single that spelled the end for Wells, who was replaced by another position player, infielder John McDonald.
"It was quite a night, surreal is probably a good word for the whole night in general," said Wells, who went 0 for 7 at the plate. "I was just trying to throw strikes. I used to pitch when I was younger. I was trying to compete. I took it serious."
Wells threw a fastball that reached 91 mph and said he threw two change-ups. But he didn't have enough to keep the Diamondbacks off the board.
"I definitely felt pretty good, but they're major league hitters," Wells said. "If I had a deeper arsenal, maybe I could've kept them off balance a little bit."
The Phillies couldn't score in the bottom of the frame off Trevor Cahill (5-10), who pitched four scoreless innings of relief in his first career appearance out of the bullpen.
Asked if he could've continued, Cahill said, "I sure hope so, but I'm glad I didn't have to find out."
The series finale will be played Sunday less than 12 hours after Ruf lined out for the final out.
Prado homered and drove in three runs for the Diamondbacks, who snapped a three-game losing streak. Parra went 5 for 9 with three RBIs and Easton had four hits and drove in two runs.
Roger Bernadina, Ruf and Carlos Ruiz homered for Philadelphia, which was vying for its fourth straight victory in walkoff fashion.
The Phillies had several chances to do it in the extra innings.
Tyler Cloyd, who pitched five scoreless innings of relief, led off the 16th with a double, just his second career hit in 23 at-bats. But the Phillies couldn't advance him. In the 14th, Ruf doubled with one out and went to third on a fielder's choice, but Michael Young grounded out with a chance to win it. In the 13th, Cloyd grounded out to strand the bases loaded.
Arizona also had its chances after regulation.
The Diamondbacks loaded the bases with two outs in the 12th, but Prado popped out, and Tuffy Gosewisch flew out in the 13th with runners on first and third.
It looked as if it was going to be an easy victory for Arizona before Philadelphia rallied for four runs in the eighth. Ruf highlighted the frame, continuing his hot streak by homering in his third straight game and ninth time in August with a two-run shot that tied it at 7.