It was past 1 a.m. on Wednesday when Trevor Plouffe stood on the steps of the Phillies dugout and realized the Dodgers were turning to an infielder to pitch the 16th inning.

Plouffe, a 32-year-old journeyman who signed a minor-league deal with the Phillies in April to keep his career alive, asked manager Gabe Kapler whether he ever faced a position-player pitcher. Kapler told him he embarrassingly struck out nine years ago against Nick Swisher.

Perhaps that memory was enough for Plouffe to make sure he would not have a similar fate. He crushed Enrique Hernandez's fifth pitch for a walk-off homer to right, and after 5 hours and 55 minutes, the Phillies finally had a 7-4 win.

"It was the fight. It was the tenacity. It was the grind. It was the drive. It was the character," Kapler said. "Everybody sort of running for their opportunity to participate in that game. And just about everybody did."

The win pushed the Phillies into sole possession of first-place, and Kapler seemed to leave nothing to chance. He used 22 of his 25 players and called on Vince Velasquez to pitch the 16th inning just two days after he logged seven innings as a starter. It was the team's longest game in five years.

>> MORE: Box score, play-by-play

Kapler used eight relievers, who recorded 33 outs without allowing a run. As the innings rolled on, the game became a stare-down between Kapler and Dodgers manager Dave Roberts to see who would be the first to use a position player to pitch. The Dodgers warmed up starting pitcher Rich Hill in the 15th inning but only wanted to use him if it was a save situation. They instead turned to Hernandez.

The Phillies had rallied in the seventh inning to tie the game on a Jorge Alfaro homer. That was enough for Kapler to refuse to blink.

Jorge Alfaro watches his two-run, game-tying, seventh-inning home run leave the park.
YONG KIM / Staff Photographer
Jorge Alfaro watches his two-run, game-tying, seventh-inning home run leave the park.

"We felt like that game was worth going all-in for," Kapler said. "Every game is, but certainly when you come back like we did, you reward your guys by fighting with them and by saying this game means everything to us. So that's how we approached it."

The Phillies planned to not use Austin Davis after he pitched on both Sunday and Monday. But those plans went awry as Tuesday turned into Wednesday with the game still tied. He pitched the 14th and 15th innings, throwing 35 pitches to keep the Phillies alive. He ended the 15th by striking out Yasmani Grandal with runners on second and third.

But his night was not done. The Phillies were out of bench players, so Davis had to bat against Dodgers closer Kenley Jansen in the bottom of the 15th with two outs and two runners on. Davis, who never batted in the minors, battled Jensen before striking out to end the inning. The game was not ready to finish.

"That was a blast, the most fun I've had since I've been up here," Davis said. "It was really fun. I thought 100 percent I was going to get a hit off Kenley Jansen. I got one foul ball, so I guess I'll take that. That was a blast."

The performance of Davis, Velasquez, and the other relievers — Adam Morgan, Drew Anderson, Victor Arano, Tommy Hunter, Pat Neshek, and Luis Garcia — was impressive. The unit lowered its ERA this month to a major-league-leading 2.54, and they did it without Seranthony Dominguez. The Phillies have yet to add a reliever this month while the top available arms have been traded elsewhere. Perhaps standing pat wouldn't be a bad idea.

"Our bullpen is nasty. I mean everyone top to bottom is gross," Davis said. "We didn't even use Seranthony today, and he's one of our best guys. I don't know what the narrative is out there, but our bullpen is disgusting."

Trevor Plouffe hits his game-winning homer.
YONG KIM / Staff Photographer
Trevor Plouffe hits his game-winning homer.

Plouffe was released in April by Texas, who had released him in March before re-signing him. He bounced last season between Tampa Bay and Oakland. The end seemed near when he arrived at triple-A Lehigh Valley in late April.

But Plouffe chugged along. A night like Tuesday, which turned into a morning on Wednesday, makes it worth it. The Phillies rushed from the dugout as his homer landed in the stands and waited to mob him at home plate. The game was finally over, but the fun part was just starting.

"All I want to do is contribute to victories here," Plouffe said. "I love being on a winning team. I haven't been on many in my career. But they're amazing. They're fun. That's it. I just want to contribute. Tonight it was my chance to come off the bench and do it. I'm happy."