A.J. Pollock played the hero for the Los Angeles Dodgers for the second straight night.

On Wednesday, he broke a tie in the 16th inning with a two-run home run off San Diego Padres left-handed pitcher Daniel Camarena. Los Angeles closed the door in the bottom of the inning to win the game, 5-3.

Pollock finished the night 1-for-7 with two RBI.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

"I just wanted to do something for the team. It was a long day. A lot of guys were grinding. A lot of tough at-bats," Pollock told Sportsnet LA.

He played the hero more than 24 hours before Wednesday night’s game. He had a game-saving catch and a two-run single to help the Dodgers beat the Padres on Tuesday night.

The game took 5 hours and 49 minutes to complete and was one of the longest games of the year.

GIANTS TURN 5 DPS, GET ALONSO WITH BAGS FULL TO TOP METS 3-2

The Dodgers thought they had the game won in the 15th inning. Billy McKinney’s line drive scored Chris Taylor and Trea Turner would score Will Smith with a single of his own. The Dodgers had a 3-1 lead going into the bottom of the inning.

Fernando Tatis Jr. saved the Padres with a two-run home run off Corey Knebel.

It was the Dodgers who got the last laugh in the end.

"I’m pretty beat. But you feel a lot better after a win. Our guys, I gotta give those guys credit … There’s just so much to unpack, but to come away with a win was huge," Dodgers manager Dave Roberts, via MLB.com.

Walker Buehler got the start for the Dodgers. He lasted 6 2/3 innings and allowed one run on three hits. He struck out eight Padres batters. San Diego started Blake Snell. He went 7 2/3 innings and allowed one run on three hits and struck out 10 batters.

CLICK HERE TO GET THE FOX NEWS APP

Los Angeles moved to 80-47 and San Diego fell to 68-60.