Grueling stretch allows Dodgers to prove their mettle

This browser does not support the video element.

LOS ANGELES -- Trailing 5-0 heading into the bottom of the ninth, with their manager ejected and several of their lineup regulars already substituted out, the Dodgers were down … but not quite out.

It took until the ninth inning, but the series finale between the Padres and Dodgers proved just as thrilling as the first three games. The benches cleared in the top of the ninth after Fernando Tatis Jr. was plunked by an L.A. pitcher for the third time this season, and a Shohei Ohtani hit-by-pitch in the bottom of the ninth put the tying run at the plate with two outs.

When the dust settled, the Dodgers' late rally wasn't enough, and they fell short of a sweep after losing 5-3 to the Padres on Thursday night. But they still took three of four from San Diego to cap a particularly challenging stretch of their schedule.

"I thought we played good baseball," manager Dave Roberts said. "I think that some of our guys didn't really perform well, and we still found a way to win more than we lost. I think that we fared really well during that stretch of baseball games."

Exactly one month ago, the Dodgers entered a stretch of their schedule that would really test them as a team.

Since opening play against the D-backs on May 19, the Dodgers have exclusively faced teams with winning records. The 29-game span ended with a true gauntlet: seven against the Padres and three against the Giants, who round out the top three in the NL West behind the Dodgers.

L.A. ended up going 17-12 in that span, taking all three series against San Diego and San Francisco to wrap the long stretch against prospective contenders.

This browser does not support the video element.

The Dodgers (46-30) emerged virtually tied with the Cubs (45-29) for the best record in the National League. They remain in first place in the division, 3 1/2 games ahead of the Giants and five ahead of the Padres.

"When you play against the Padres, the Giants -- it all goes so fast, I don't even remember all the teams we've played here recently," Mookie Betts said. "But you're playing against the people that know you the most. It's fun and it's good baseball. It gets emotional sometimes."

This browser does not support the video element.

That's an understatement when it comes to the Padres-Dodgers rivalry.

Yoshinobu Yamamoto rebounded nicely from last Friday, when he allowed five runs in 4 2/3 innings against the Giants, with a quality start against the Padres on Thursday night. He allowed three runs across 6 1/3 innings, but the Dodgers couldn't muster enough offense to back him.

This browser does not support the video element.

Their best shot came after the benches had cleared in the top of the ninth, and Roberts and Padres manager Mike Shildt had both been ejected from the game. The Dodgers were able to scratch a pair of runs across before Padres closer Robert Suarez hit Ohtani with a 3-0 count.

Both benches were issued warnings after the earlier fracas, so Suarez was ejected and the Padres had to call on Yuki Matsui to finish the job.

This browser does not support the video element.

That suddenly gave the Dodgers a fighting chance to come back with two outs remaining in the game, but the top of the order lacked its usual punch. Roberts had already pinch-hit for Betts, Will Smith and Freddie Freeman in the eighth inning. The rally ultimately died when Dalton Rushing struck out swinging.

Thus ended the gauntlet for the Dodgers, who host the Nationals (31-44) this weekend at Dodger Stadium.

This browser does not support the video element.

It was a victory in itself to come out of the 29 games against winning teams with a winning record, especially considering the state of the Dodgers' pitching staff. They were without three members of their Opening Day rotation in that span -- Tyler Glasnow, Blake Snell and Roki Sasaki -- and lost another starter, Tony Gonsolin, to an elbow injury.

They returned a couple of key arms in their bullpen, Kirby Yates and Michael Kopech, but learned they would lose Evan Phillips for the season due to Tommy John surgery. Blake Treinen and Brusdar Graterol are still on the mend as well.

And yet the Dodgers find themselves on the other side of a long month in quite good shape.

"It just shows we're deep," Betts said. "But we still got a couple months to go and just have to keep playing good Dodger baseball."

More from MLB.com