The Diamondbacks sent 11 batters to the plate in the 18th against two position players, Wells and McDonald. Sandberg stopped Wells' nightmare at 40 pitches. He was the losing pitcher and made outs to end the 10th and 16th innings.
"It's a shame it got to that," Sandberg said.
"That's the last thing you want to see," McDonald said.
"We don't have to do it this way," Arizona manager Kirk Gibson said. "But we did it."
It is remarkable that Saturday's game, which ended at 2:12 a.m. Sunday, lasted so long. The Phillies' starting pitcher, Ethan Martin, failed to record three outs. They trailed by six runs, rallied in the eighth for a dramatic tie, and matched zeroes with Arizona for hours. If management is looking for signs of life under Sandberg, this game offered plenty of evidence.
The two teams used 44 players. The 20 pitchers used tied a major-league record. They threw 712 total pitches. There were 28 walks, 18 of which were issued by Phillies pitchers to set a franchise record.
By using Tyler Cloyd, the Phillies forfeited their scheduled Sunday starter. Instead, Roy Halladay will pitch three months after shoulder surgery rather than start at double-A Reading.
Cloyd threw 91 pitches in five scoreless innings. He doubled to begin the 16th but was stranded there and was removed from the game. B.J. Rosenberg pitched for a third consecutive day, something he had never done, before Wells entered.
The Phillies stranded 17 runners — 11 in extra innings — and were 2 for 15 with runners in scoring position.
"Just exhausted," Sandberg said.
Wells, a man hanging on the fringes of the major leagues, dressed in silence. He wore thick-rimmed black glasses and spoke in cliches. The former college pitcher who tossed a scoreless inning for the Chicago White Sox earlier this season said he wanted to throw strikes. "I took it serious," he said.
"It was impressive," Diamondbacks outfielder Tony Campana said. "You'd think with a position player up there, you wouldn't go up and see 90, 91 and a really good change-up."
Adam Eaton smashed a belt-high fastball to center. Campana, who walked, said he took "the biggest lead I've ever had before in my life." He easily scored. Wells' night devolved from there.
"I guess surreal is probably a good word for the whole night," Wells said. "I just went in there and tried to do my best."
The Phillies tied it with four in the eighth. The fans at Citizens Bank Park wanted a curtain call in Game 129, and Darin Ruf obliged. He smashed his hands together when he stomped on first base. He screamed when he touched home plate. He poked his head from the Phillies dugout and waved his helmet.
Ruf blasted his ninth August home run, which tied him with Miguel Cabrera for most in baseball this month. He continues to impress with hopes of winning a permanent job in 2014.
The outfield was dealt a blow when Domonic Brown exited with soreness in his right Achilles tendon. He was removed after the second inning. Sandberg said the injury was not serious.
The late-inning zaniness and yet another ferocious comeback overshadowed a miserable start. Martin's education lasted 19 minutes and 44 pitches Saturday. He allowed three runs. Sandberg fetched his rookie starter, and the energy of three consecutive walk-off victories wilted before the sun set.
Martin's outing was the shortest not affected by injury or rain for a Phillies starter since J.D. Durbin allowed seven runs on Sept. 1, 2007, without recording an out. Later that month, the Phillies staged a spectacular comeback to win their first of five straight National League East pennants. Those days feel like forever ago.
The rest of the night was spent overcoming Martin's deficiencies. Sandberg batted Roger Bernadina leadoff in his second Phillies start. He crushed a Randall Delgado fastball into the Phillies bullpen for a solo homer in the sixth. He drew a key walk in the four-run eighth. He doubled in the 11th.
Carlos Ruiz crushed his fourth homer, delivered a run-scoring single in the eighth, and doubled with two outs in the 18th. Ruiz is hitting .368 in August with a rediscovered power stroke. The impending free agent is restating his case to be Philadelphia's catcher beyond this season on a regular basis.
Those swings were footnotes because Martin trudged to the dugout at 7:25 p.m. with his face covered by his black glove and a humbled Sandberg swapped outfielders on the mound at 1:56 a.m. Eleven Phillies threw 395 pitches, and the end crept closer by one agonizing night that bled into morning.
Contact Matt Gelb at firstname.lastname@example.org. Follow on Twitter @magelb.