SAN DIEGO — No known cure for a team-wide slump has ever been quite as effective as facing a rookie starting pitcher with a 9.28 ERA for a last-place team.

And Walker Lockett was the perfect flavor of medicine for the Phillies' ailing bats.

Three batters into the game here Saturday night, the Phillies had already broken a 19-inning scoreless drought. Two batters after that, they seized a two-run lead. By the middle of the fifth inning, they were leading by five runs on their way to an easy-breezy 5-1 victory over the San Diego Padres, a welcome departure from the heaping pile of cuticle-chompers they have played lately.

"It's always good when we score early," said ace Aaron Nola, who blanked the Padres for six innings to help the Phillies to their first win at Petco Park since Aug. 7, 2016. "We've been in kind of a rut a little bit. But we know what we have. It's just a matter of time that the offense turns around. It did tonight. They have confidence in themselves, and they know we're going to put up runs."

The win, coupled with the Atlanta Braves' 4-2 loss at home against the Milwaukee Brewers, put the Phillies back into sole possession of first place in the National League East. It also gave them a chance to go home with a .500 record on this six-game West Coast road swing if they're able to defeat the Padres in Sunday's series finale.

And with their 65th victory in only their 116th game, they're one win shy of matching their total from all of last season.

"I think it's an indication and evidence that our players have developed," first-year manager Gabe Kapler said. "That's probably the most notable thing. It was a good team in spring training. We felt confident in that. But we also knew in order for us to have a really good year, we would have to have our players take some steps forward. I think we've seen that with a number of our guys."

Two of those young players — rightfielder Nick Williams and third baseman Maikel Franco — helped to spark the offense, at last. Williams sliced a triple into the right-field corner in the first inning against Lockett to give the Phillies their first run since Tuesday night in Arizona. In the fourth inning, Franco smoked a solo home run off the warehouse in left field to make it 3-0.

For a change, the Phillies didn't need their starting pitcher to be lights out. And Nola wasn't at his sharpest, at least early on. He struggled with his command en route to walking three batters, including Lockett in the second inning.

"It kind of felt like he was taking some time to get into his rhythm," Kapler said. "When he did, it started to get really, really good."

Said Nola: "They worked some counts on me, laid off some good pitches. I kind of got out of my delivery a little bit. But I battled. I put up zeroes."

Indeed, Nola improved his record to 13-3 and lowered his ERA to 2.28, tied with Washington's Max Scherzer for second-best in the National League. Nola also continued the run of stellar starts from the Phillies' rotation. In the last 11 games Nola, Jake Arrieta, Nick Pivetta, Vince Velasquez and Zach Eflin have combined for a 1.89 ERA.

Unlike some of those games, when the starters' performance went for naught, Nola was supported by four extra-base hits. After Williams' triple, Asdrubal Cabrera notched an RBI double in the first inning. One inning after Franco homered, Cesar Hernandez tacked on a solo shot against Lockett, marking his career-high 10th homer of the season. Rhys Hoskins also snapped an 0-for-22 funk with a fifth-inning single.

The offense still didn't completely click. Lockett, making his third career start, retired nine of 10 batters between Cabrera's double and Franco's homer. Cleanup-hitting Carlos Santana and Odubel Herrera each went 0 for 4 to deepen their funks to 2 for 20 and 4 for 27, respectively.

But five runs represented good progress for a Phillies team that had scored only seven runs in its previous four games.

"We always like to do that," Cabrera said of taking an early lead. "We did that today early in the game, and that makes the pitcher feel more comfortable on the mound, too."

Struggling closer Seranthony Dominguez came on for the ninth inning, his first appearance since giving up two runs and blowing a save in the ninth inning Monday night in Arizona. He allowed a leadoff single to Cory Spangenberg but retired the next three batters, including strikeouts of Manuel Margot and Eric Hosmer.

Win No. 65 was in the books. The Phillies didn't win their 65th game last season until Sept. 29.

"It's pretty awesome, man," Nola said. "Winning's a lot more fun. It's a lot more addicting. Chemistry is better. I think overall we're a lot better team than we were last year. We knew it coming into spring training. We knew it going into the season that we were going to be a better team."

Get insights on the Phillies delivered straight to your inbox with Extra Innings, our newsletter for Phillies fans by Matt Breen, Bob Brookover and Scott Lauber. Click here to sign up.