(Sports Network) - All eyes will be on the mound for a few different reasons on Sunday afternoon, when the Arizona Diamondbacks and Philadelphia Phillies wrap up a three-game series less than 12 hours after a marathon in the previous meeting.

The Diamondbacks evened this series by outlasting the Phillies 12-7 in 18 innings. The scheduled 7:05 p.m. (ET) contest ran seven hours and six minutes, the longest time of game for both clubs in franchise history.

It took another Philadelphia comeback to kick start the marathon. The Phillies trailed 5-0 after three innings before clawing back and evening things up with a four-run eighth inning, capped by Darin Ruf's two-out, two-run homer.

But Philadelphia used 11 pitches in the game, including starter Ethan Martin, who was lifted after recording only two outs in the first inning. The final two hurlers were both position players as outfielder Casper Wells came in from right to start the 18th. He recorded two outs, but issued a walk to Tony Campana, who scored easily on a hit-and-run when Adam Eaton punched a hit to center.

"(Wells) actually came out with some good stuff, getting the first two hitters. It looked like he was going to give us another chance to put a zero up," Phillies interim manager Ryne Sandberg said.

Arizona ended up scoring five runs in the frame and outfielder John McDonald came in from left field to relieve Wells, giving up an RBI single before getting the final out.

Trevor Cahill, who was scheduled to start Tuesday for Arizona, finished off four scoreless relief innings in the home half to pick up the win and snap Arizona's three-game slide.

"The (pitchers) in extra innings just stepped up huge, putting up zeros over, over and over again," Arizona's Cliff Pennington said.

Martin Prado hit a two-run homer and drove in three, while Gerardo Parra had a career-high five hits for the D'backs.

The win kept Arizona seven games behind Cincinnati for the NL's second wild card.

Both teams lost players to injury as well. Arizona's Aaron Hill exited with a groin injury in the 11th, while Domonic Brown lasted only two innings because of a sore right heel.

Philadelphia had won five of six coming in, including three straight walk-off wins, and will accelerate Roy Halladay's return to the majors after using Sunday's scheduled starter, Tyler Cloyd, for five innings of relief last night.

Halladay went 2-4 with an 8.65 ERA in seven starts this year before undergoing shoulder surgery 11 days after his last start on May 5. The right-hander was to make his third rehab start today, slated to pitch for Double-A Reading.

Instead, the 36-year-old and former two-time Cy Young Award winner will try to give Philadelphia some much-needed innings. In his most recent appearance, with Class-A Lakewood on Tuesday, Halladay allowed two runs over 6 1/3 innings.

"I believe he was our best option for (Sunday) and will give us what he has," said Sandberg, who said the club had to call general manager Ruben Amaro Jr. during the game to see if Halladay would be able to make the start.

Sandberg also said it was possible the Phillies would add a second pitcher to the roster for this game for more help.

In five previous meetings with the Diamondbacks, Halladay is 4-1 with a 2.21 ERA.

While it is unknown what kind of effort Halladay will be able to give, the Diamondbacks have to feel good about sending Patrick Corbin to the mound today. After all, the left-hander is coming off his second career complete game.

Corbin snapped a four-game winless drought by besting Cincinnati on Tuesday. He gave up two runs on six hits and did not walk a batter while striking out 10 for the third time in his last eight starts.

"I had my best slider going. I felt good in the warm-up, so I thought it was going to be a good game. I knew I could rely on my slider any time," Corbin admitted.

The 24-year-old is 13-3 with a 2.45 ERA in 25 starts this year and the D'backs are 21-4 in those starts.

Corbin faced the Phillies for the first time in his career on May 9 and won a 2-1 decision, giving up a run on four hits and two walks over 6 1/3 innings.

The Diamondbacks and Phillies split a four-game series in Arizona from May 9-12.